-
集合并(UNION)
select staff_id from testA UNION select staff_id from testB; -
集合全并操作(返回包含重复行的所有行.)
select staff_id from testA UNION all select staff_id from testB; -
集合交操作(intersect)返回两个结果集中都存在的数据
select staff_id from testA intersect select staff_id from testB; -
集合差操作(Minus)将返回第一个表减去第二个表相同行的剩余行
select staff_id from testA MINUS select staff_id from testB;
注意:使用集合操作时,两个表的表列数据类型必须相同.如果数据类型不同,将出现错误