SQL IN clause Statements

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

select title from humanresources.employee where title in ('recruiter', 'stocker')
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.

 
 

Share your thought