sql compare 2 tables for differences and print mismatched columns code example Example: sql compare data from two tables select * from tableA minus select * from tableB