发布网友
共1个回答
热心网友
个人认为采用:not exists 比较好点恩
select *
from A, ( select distinct y from B ) B where A.x = B.y;
select * from A where exists ( select null from B where y = x )
执行的过程相当于:
for x in ( select * from A )
loop
if ( exists ( select null from t2 where y = x.x )
then
OUTPUT THE RECORD
end if
end loop
从这里就可以看出来了