Friday, October 23, 2009

What is the EXISTS operator in SQL Server ? OR What is the EXISTS keyword in SQL Server ?

When you use EXISTS, you do not really returned data - instead you return a simple TRUE/FALSE regarding the existence of data that meets the criteria established in the query that the EXISTS statement is operated against.
EXISTS simply test whether the inner query returns any row. If it does, then the outer query proceeds, if not, the outer query does not executes, and the entire SQL statement returns nothing.

The EXISTS condition is considered "to be met " if the subquery returns at least one row.

The syntax for EXISTS condition is -
SELECT columns FROM sometable WHERE EXISTS (subquery)

Share This!


2 comments:

Anonymous said...

Я согласен с условиями предоставления услуги.

Anonymous said...

After all, it is not hard for website visitors to pick up on the pain you are taking a look at about the Internet simply by intercepting the signals.
Putting such information make album worth buying and keeping as collector's
item. The theme assumes various transformations during the course from the movie, however it is the haunting solo trumpet theme that basically defines the movie.

Powered By Blogger · Designed By Seo Blogger Templates