SQL IN operator allows you to specify the multiple values in the SQL WHERE clause. Here is the general form of the IN Operator in SQL:
SELECT column_name(s) FROM table_name WHERE column_name IN (value1,value2,...);
Here is an example of SQL IN Operator. Consider the table CUSTOMERS having the following records:
The following SQL statement selects all the customers whose Address is "Mumbai" or "New Delhi":
SELECT * FROM Customers WHERE address IN ('Mumbai','New Delhi');
After querying the above, you will get this output:
© Copyright 2021. All Rights Reserved.