重复记录:
create table temp as select * from A where A.pri_key in (select B.pri_key from B)不重复记录:
create table temp as (select * from A where A.pri_key not in (select B.pri_key from B)
union
select * from B where B.pri_key not in (select A.pri_key from A)如果觉得不高效的话,用MERGE语句。
create table temp as select * from A where A.pri_key in (select B.pri_key from B)不重复记录:
create table temp as (select * from A where A.pri_key not in (select B.pri_key from B)
union
select * from B where B.pri_key not in (select A.pri_key from A)如果觉得不高效的话,用MERGE语句。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货