集合操作符 Union / Union All / Intersect / Minus
集合操作符
Union / UnionAll / Intersect / Minus
-- 生成测试数据
create table dept_01 as select * from dept where rownum < 6;
create table dept_02 as select * from dept where rownum < 4;
insert into dept_02 values (98, '小吃部', '斗门');
insert into dept_02 values (99, '外卖部', '香洲');
commit;
select * from dept_01
union
select * from dept_02;
select * from dept_01
union all
select * from dept_02;
select * from dept_01
intersect
select * from dept_02;
select * from dept_01
minus
select * from dpet_02;