联合要求:
结果集列数要一致
对应列的类型要一致
union、union all、except、intersect
用处:在查询结果处显示汇总
select cid from classinfo
--union--去重
--union all--全部都在
--except--差集
--intersect--交集
select sid from studentinfo
联合要求:
结果集列数要一致
对应列的类型要一致
union、union all、except、intersect
用处:在查询结果处显示汇总
select cid from classinfo
--union--去重
--union all--全部都在
--except--差集
--intersect--交集
select sid from studentinfo