earwig75
asked on
Display records found in 1 table but not the other
I have 2 tables, let's pretend they are called Table1 and Table2. A column found in both tables is called "MyNumber".
I need to write my select statement to show all records in Table1, but only if the record isn't in Table2.
If the result for "MyNumber" is in Table1 and Table2, I don't want it to display in my query. I only want the records from Table1, that are not found in Table2 to display.
Can someone help?
I am not sure if I should use Exist, or NOT IN... or...
I'm not sure what would be the most efficient method.
Thank you.
I need to write my select statement to show all records in Table1, but only if the record isn't in Table2.
If the result for "MyNumber" is in Table1 and Table2, I don't want it to display in my query. I only want the records from Table1, that are not found in Table2 to display.
Can someone help?
I am not sure if I should use Exist, or NOT IN... or...
I'm not sure what would be the most efficient method.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.