Mysql筛选出两张表中不同的数据的SQL

1.筛选不同的数据

select * from b_sendmsgb where not EXISTS(select * from sendmsgb_bak where b_sendmsgb.cardNum=sendmsgb_bak.cardNum);

2.筛选出不通数据后,按卡号排序

select * from sendmsgb_bak where not EXISTS(select * from b_sendmsgb where sendmsgb_bak.cardNum=b_sendmsgb.cardNum) ORDER BY cardNum;

Mysql筛选出两张表中不同的数据的SQL

上一篇:SQL每日一题(20200506)


下一篇:ModbusTCP报文详解【二】