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

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

使用外连接查询

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;

猜你喜欢

转载自www.cnblogs.com/lqh969696/p/11506804.html