SQL IN clause Statements

OBJECTIVE

In this chapter you will learn:

What is IN clause?
Syntax of IN clause
Example of IN clause

 

What is IN clause?

SQL IN clause is used to specify the subqueries and multiple values in a where statement. If you have a subquery which return more values then you might need to match the value of a column in the returned list of inner query then you can use IN clause.

Syntax of IN clause

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

Example of IN clause

in clause example image

 

SUMMARY

In this chapter you have learned about IN clause and one example is given for your better guide. In the next chapter you will learn about EXISTS clause.

 


Leave a Reply

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