select Bname from tab Minus select Sname as Bname from tab
select Bname from Table a where not exists(select 1 from Table b where a.Bname=b.Sname)
试下对不 SELECT BNAME FROM TABLE WHERE BNAME NOT IN (SELECT SNAME FROM TABLE); SELECT BNAME FROM TABLE A WHERE NOT EXISTS (SELECT 1 FROM TABLE B WHERE A.BNAME=B.SNAME);
select Bname from tab Minus select Sname as Bname from tab这个比较好!! 谢谢
select col1 from temp t where t.col1 not in(select nvl(col2,0) from temp )
select bname from table where bname not in(select sname from table)
Minus
select Sname as Bname from tab
SELECT BNAME FROM TABLE WHERE BNAME NOT IN (SELECT SNAME FROM TABLE);
SELECT BNAME FROM TABLE A WHERE NOT EXISTS (SELECT 1 FROM TABLE B WHERE A.BNAME=B.SNAME);
Minus
select Sname as Bname from tab这个比较好!! 谢谢
from temp t
where t.col1 not in(select nvl(col2,0) from temp )