回複:how to deal exist? 不搞的這麽複雜

回答: how to deal exist? 不搞的這麽複雜奉旨灌水2013-03-05 20:15:54

select * from tableA
union
select * from tableB
where not exists(select * from tableA where pk = tableB.pk)

or

select * from tableA
union
select * from tableB
where pk not in (select pk from tableA)

or use union all

所有跟帖: 

OK, I'll try. Thanks, vielen dank.Merci, תוד&# -奉旨灌水- 給 奉旨灌水 發送悄悄話 奉旨灌水 的博客首頁 (0 bytes) () 03/05/2013 postreply 20:25:40

請您先登陸,再發跟帖!