Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

difference between 'exist' and 'in'

Status
Not open for further replies.

dky1e

Programmer
May 4, 2002
293
US
1. What is the difference between 'exist' and 'in' statements?

2. Why don't I get the same results for those querries:
Query1:
select a1.c1 from a a1
where exists
(
select b1.c1 from b b1 where ( a1.c1 = b1.c1 )
)
Query2:
select a1.c1 from a a1
where not exists
(
select b1.c1 from b b1 where ( a1.c1 != b1.c1 )
)

Thanks.
 
This question has been answered in thread183-265693 of the SQL Server forum.

I recommend joining Tek-Tips so you can get email notification of replies to your posts as well as the ability to list threads in which you participate. I also recommend that you avoid posting in multiple forums unless you don't get an answer in the first forum or are directed to a more appropriate forum. Terry L. Broadbent - DBA
Computing Links:
faq183-874 contains "Suggestions for Getting Quick and Appropriate Answers" to your questions.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top