ClowWater
asked on
SQL Select | Join tables where data not in second table
SQL 2005
To simplify what I want to do...
I have table1 and table2. I want to select the records in table1 that are not in table2. I know I can do this by the following:
select t1.name, t1.address from t1 where t1.id not in (select t2.id from t2)
But is there a faster way? The only field in t2 is "id".
To simplify what I want to do...
I have table1 and table2. I want to select the records in table1 that are not in table2. I know I can do this by the following:
select t1.name, t1.address from t1 where t1.id not in (select t2.id from t2)
But is there a faster way? The only field in t2 is "id".
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.