回复: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

请您先登陆,再发跟帖!