I need to restrict a result set for a SELECT statement based upon Col1 have 1-to-many potential values. For example, I want to return all rows where Col1 equals a value of 1, 2, and 3.
So far I have two different approaches to restricting the result set:
Approach #1
Inner Join Table1 On (Table2.ColA=Table1.ColA) And (Col1=1 And Col1=2 And Col1=3)
Approach #2
Inner Join Table1 On Table2.ColA=Table1.ColA
Where (Col1=1 And Col1=2 And Col1=3)
Is one of these approaches preferred or is there an alternate approach that would be more efficient? The values are dynamic and passed to the stored procedure each time it is called.
Thanks, Chris