当前位置: 代码迷 >> Oracle开发 >> not exists无效?该怎么解决
  详细解决方案

not exists无效?该怎么解决

热度:51   发布时间:2016-04-24 06:57:47.0
not exists无效?
select * from testa 

select * from testb


select * from testa 
where not exists
(select * from testb) 

结果为空,为什么,该怎么取出差异行

    
exists oracle

------解决方案--------------------
这个结果必须为空啊....
选择差异行:
select * from testa a
 where not exists
 (select * from testb b where a.H0=b.H0) 
------解决方案--------------------
最简单的方法就是利用minus
select * from testa
minus 
select * from testb
  相关解决方案