1. select distinct A.ID from A where A.ID not in (select ID from B);
2. select A.ID from A left join B on A.ID=B.ID where B.ID is null;
3. select * from B where (select count(1) as num from A where A.ID = B.ID) = 0
1. select distinct A.ID from A where A.ID not in (select ID from B);
2. select A.ID from A left join B on A.ID=B.ID where B.ID is null;
3. select * from B where (select count(1) as num from A where A.ID = B.ID) = 0