查看一个表中的数据是否在另一个表中存在 2019-03-15 本文已影响0人 zhouwude 查看一个表中的数据是否在另一个表中存在 第一种方案: select * from tb_a A where NOT EXISTS (select 1 from tb_b B where A.ID = B.ID) 第二种方案: select * from tb_a A where A.ID NOT IN(select B.ID from tb_b B ) 参考1 参考2