Abe's answer is correct, but only if they have the same number of lines. (I misunderstood the question when I wrote my initial answer, "condemning" his answer.) If table1 can be a subset of the (larger) table2, or vice versa, I would try:
select ( not exists ( select * from table1 except select * from table2 ) and not exists ( select * from table2 except select * from table1 ) )
This gives true if they are the same, and false if they are different.
Eric brown
source share