cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Table data comparison

Former Member
3,616

When comparing data (fields) between two tables is there an advantage to using EXCEPT, INTERSECT, or, in the case of looking for data in ONE field between two tables, can a JOIN of the two tables accomplish the same thing?

ex: //join two tables and look for matching fields: select t.FIELD, t2.FIELD from tableone t join tabletwo t where t.FIELD = t2.FIELD

ex2: //two tables comparing the same two fields using intersect:

ex3: //two tables comparing the same two fields using except:

Appreciate any help provided.

View Entire Topic
Former Member
0 Likes

The answer will depend on what the question is - are you looking for rows that are the same, rows that are different, or both?

See the answers in this thread that can get you started.

Former Member
0 Likes

I'll try to clarify. If you are looking in two tables to see if data in one field is the same in both tables is there a benefit to using a join or INTERSECT/EXCEPT. This could be if the fields are the same, different or both. Generally speaking. Will a join provide the same results as INTERSECT/EXCEPT?