我需要比较两个表中的2个字段,以找到不匹配的记录,并将这些记录插入新表
试试这个
创建一个包含必需字段的表(new_table)
INSERT INTO new_table
SELECT table1.field1, table2.field2 FROM table1, table2
WHERE (
table1.field_name != table2.field_name
);