MySql 查询两张表的数据差别

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_39036844/article/details/81588569
select  *  from  tb_a   A  where  A.ID  NOT IN(select  B.ID  from tb_b  B );
select  *  from  tb_a   A  where  NOT EXISTS (select 1 from tb_b  B  where  A.ID = B.ID);

猜你喜欢

转载自blog.csdn.net/qq_39036844/article/details/81588569