intersect 相交,except 相减,union 合并 ,union all 合并全部区别
select * from PV_ENCOUNTER where CODE_PV like '200630001%'
intersect --相交的
select * from PV_ENCOUNTER where CODE_PV like '2006300011'
select * from PV_ENCOUNTER where CODE_PV like '200630001%'
except--不相交的
select * from PV_ENCOUNTER where CODE_PV like '2006300011'
select * from PV_ENCOUNTER where CODE_PV like '200630001%'
union--相同的会去重
select * from PV_ENCOUNTER where CODE_PV like '2006300011'
select * from PV_ENCOUNTER where CODE_PV like '200630001%'
union all--相同的不会去重
select * from PV_ENCOUNTER where CODE_PV like '2006300011'
浙公网安备 33010602011771号