方法一(效率底)

select A.* from 办卡 A where A.namedh not in (select namedh from 银行)

方法二(效率中)

select A.* from 办卡 A left join 银行 b on A.namedh=B.namedh where B.namedh is null  

方法三(效率高)

select * from  办卡 A where (select count(1) as num from 银行 B where A.namedh = B.namedh) = 0
05-13 14:32