Oracle查询2张表差集、交集、并集
2021-03-25 本文已影响0人
打不死的小强8号
差集
select 字段1 from 表1 minus select 字段1 from 表2
交集
select 字段1 from 表1 intersect select 字段1 from 表2
并集
select 字段1 from 表1 union all select 字段1 from 表2
select 字段1 from 表1 minus select 字段1 from 表2
select 字段1 from 表1 intersect select 字段1 from 表2
select 字段1 from 表1 union all select 字段1 from 表2