I’ve got a situation where I updated one table with some 3rd party utility, and I want to compare it to the original table and make sure it made the correct mount of updates and inserts.
So, I’d like to do something like this, but I don’t quite know the syntax:
SELECT * FROM table1 AS a RIGHT OUTER JOIN table2 AS b WHERE
<there is some difference between the row from a and the row from b,
regardless of which column it's in>
How can I compare all the fields without having to explicitly write them all one by 1?
EDIT: I should also mention that I did the update in a copy of the table, so assume is the original and is the updated copy.
What you should use is a MINUS query
this returns all rows from table1 that whose data (field1, field2, field3, field4) can not be found on table2. Warining: it does not the other way around, so if you also need the data that is in table2 and not on table1, then you have to do a second query doing table2 MINUS table1.