Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 question about the IN operator

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-04-28 : 07:33:48
Clint writes "How do you use the IN operator when joining tables"

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2003-04-28 : 08:03:52
The same as you would use any other logical operator (=, <, etc). Just remember the righthand side needs to be a list.


Select a.*, b.*
from
a
inner join
b
on
a.f1 in (b.f1, b.f2, b.f3)

???


- Jeff
Go to Top of Page
   

- Advertisement -