SQL how to compare two tables for same data content?

You should be able to “MINUS” or “EXCEPT” depending on the flavor of SQL used by your DBMS.

select * from tableA
minus
select * from tableB

If the query returns no rows then the data is exactly the same.

Leave a Comment