I\'m wanting to select rows in a table where the primary key is in another table. I\'m not sure if I should use a JOIN or the IN operator in SQL Server 2005. Is there any si
Neither. Use an ANSI-92 JOIN:
SELECT a.* FROM a JOIN b a.c = b.d
However, it's best as an EXISTS
SELECT a.* FROM a WHERE EXISTS (SELECT * FROM b WHERE a.c = b.d)
This remove the duplicates that could be generated by the JOIN, but runs just as fast if not faster