SQL EXISTS clause Statements

OBJECTIVE

In this chapter you will learn:

What is EXISTS clause?
Syntax of EXISTS clause
Example of EXISTS clause

 

What is EXISTS clause?

The EXISTS clause helps to check the existence of a subquery according to the condition specified and passes the status of existence to the outer query. It always returns a Boolean value (True or False).

 

Syntax of EXISTS clause

SELECT column_name from table_name where EXISTS (SELECT column_name from table_name where conditional_expression)

 

Example of EXISTS clause

 

exists clause example screen shot

 

SUMMARY

In this chapter you have learned about EXISTS clause with an example. In the next chapter you will learn about BETWEEN clause.


Leave a Reply

Your email address will not be published. Required fields are marked *