If the purpose of this script is to detect whether two tables with identical structure have different data, it might be nice to check the row counts before jumping into a potentially expensive comparison.
Just a thought.
Carl Anderson
Data Architect, Northwestern University