Home » SQL

IN Operator with Example in SQL

In this article, we are going to discuss about use of IN Operator in SQL statement.
Submitted by Bharti Parmar, on December 30, 2018

When you have multiple conditions to be checked, we can use IN operator instead of it. It specifies the multiple values in a WHERE clause.

Syntax:

    SELECT column_name FROM table_name WHERE column_name IN (value1… valueN);

Example:

Table 1:

customer_IDcustomer_NameAddresscityCountry
3 Aman Gautam Roxy Gwalior India
2 Atul Anand Vinay nagar Gwalior India
1 Bharti Parmar Sapta Bihar India
4 Partha Biswas Tripura West bengal India

Query to find customer_name and address where city is bihar

IN Operator

Conclusion:

In this article, we have learnt how to use IN Operator? I hope you understand the concept; if you have any query, feel free to ask in the comment section.



Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.