例:有A = {1,2,3,4,5}和b = {4,5,6};A和B是两张表,它们有相同的列为ld。
1.求出A中有的所有id值,除了B中有的:select * from A where A.id not in(select id from B);
2.求出A和B中共同拥有的:select *from A where A.id in(select id from B);
例:有A = {1,2,3,4,5}和b = {4,5,6};A和B是两张表,它们有相同的列为ld。
1.求出A中有的所有id值,除了B中有的:select * from A where A.id not in(select id from B);
2.求出A和B中共同拥有的:select *from A where A.id in(select id from B);