exist sql

13年前

SELECT A.* FROM A WHERE EXISTS(SELECT B.ID FROM B where b.id=a.id)

SELECT A.* FROM A,B WHERE A.ID=B.ID(+)
======代表A的记录会全部显示出来
SELECT A.* FROM A,B WHERE A.ID(+)=B.ID
======代表b的记录会全部显示出来