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
 SQL Server Development (2000)
 EXIST; can you use it like IN?

Author  Topic 

ElCapitan
Starting Member

28 Posts

Posted - 2009-02-02 : 06:12:40
Hi all,
Is it possible to use EXIST like IN?
Example

SELECT * FROM tbl WHERE tbl.id IN (1,2,3)

Can it be written as...

SELECT * FROM tbl WHERE tbl.id EXIST (1,2,3)

I expect not but I might not be writing it correctly. Thanks for your help.

bklr
Master Smack Fu Yak Hacker

1693 Posts

Posted - 2009-02-02 : 06:42:46
no u can't write exist as in
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2009-02-02 : 07:24:09
JOIN vs IN vs EXISTS - the logical difference:
http://weblogs.sqlteam.com/mladenp/archive/2007/05/18/60210.aspx

___________________________________________________________________________
Causing trouble since 1980
Blog: http://weblogs.sqlteam.com/mladenp
Speed up SSMS development: www.ssmstoolspack.com <- version 1.1 out!
Go to Top of Page

ElCapitan
Starting Member

28 Posts

Posted - 2009-02-02 : 07:25:20
Ok, I thought as much. Thanks guys.
Go to Top of Page
   

- Advertisement -