Hey guys,
I'm using DB2 and I have two tables that have a million+ rows in them. Is there a query I can create that will check the two tables to see if all the values in the two are the same? Or, what is the best way to do this?
Thanks, Tyler
Hey guys,
I'm using DB2 and I have two tables that have a million+ rows in them. Is there a query I can create that will check the two tables to see if all the values in the two are the same? Or, what is the best way to do this?
Thanks, Tyler
Use:
SELECT *
FROM TABLE_A
INTERSECT
SELECT *
FROM TABLE_B
...assuming columns are identical. For more info on INTERSECT (and EXCEPT), see this article.