两张表数据不一致进行对比


两张表数据不一致进行对比,找不不一样的数据,

使用外连接查询

SELECT * from ys_yhxx yh1 left join ys_yhxx_copy1 yh2 on yh1.customerNo=yh2.customerNo WHERE yh2.customerId is null;
SELECT * from ys_yhxx_copy1 yh1 left join ys_yhxx yh2 on yh1.customerNo=yh2.customerNo WHERE yh2.customerId is null;


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM