mysql比较两张表差异数据
insert into sb_zjgc_in_sapzcmxb (zjhth,zjzcms)
SELECT
zjhth,zjzcms
FROM
( SELECT t1.zjhth, t1.zjzcms FROM sb_zjgc_in_sapzcmxb t1
UNION ALL SELECT t2.zjhth, t2.zjzcms FROM in_sapzcmxb t2 where t2.zjhth like '%DFPV%' ) t
GROUP BY
zjhth,
zjzcms
HAVING
count( * ) = 1
ORDER BY
zjhth;