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.

 

More Articles

 

Share your thought



PLEASE DISABLE ADBLOCKER AND SUPPORT US!

Please support us by enabling ads on this page. Refresh

YOU DON'T LIKE ADS, WE ALSO DON'T LIKE ADS!
 
But we have to show ads on our site to keep it free and updated. We have to pay huge server costs, domain costs, CDN Costs, Developer Costs, Electricity and Internet Bill. Your little contribution will encourage us to regularly update this site.