实用的SQL语句集
有两个表t1和t2,如下所示:
表t1:select * from t1
表t2:select * from t2
如果SQL语句为:
select 0 as cid,'未指定' as name UNION ALL select cid,name from t1
则得如下数据:
如果SQL语句为:
select *,'' as col1 from t1
select *,'a' as col1 from t1
select *,2 as col1 from t1
将分别得到如下三种数据:
浙公网安备 33010602011771号