Compare two identical tables MySQL
问题 I'm currently in the process of converting data, in a table, which is why I've created a new table, identical to the old one, but empty. I've run my data converter, and I have a difference in row count. How do I select all rows that are different from the two tables, leaving out the primary key identifier (that differs on every entry). 回答1: select * from ( SELECT 'Table1',t1.* FROM table1 t1 WHERE (t1.id) NOT IN (SELECT t2.id FROM table2 t2) UNION ALL SELECT 'Table2',t2.* FROM table2 t2 WHERE