SQL 的union
联合多个select 的结果集,需要相同数量列,数据类型,顺序一致 的前提条件
select columns from t1 union select columns from t2
union all 包含重复的 union 无重复值
select columns from a union all select columns from b ---总是包含a 的所有列
count() 计数
select count(columnname) from tab1
count(*) 所有记录数
select count(distinct columname) from tab1 ---指定列不同值数目