codescracker


sql

SQL In



« Previous Tutorial Next Tutorial »


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,...);

SQL IN Operator Example

Here is an example of SQL IN Operator. Consider the table CUSTOMERS having the following records:

sql in operator

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:

sql in

« Previous Tutorial Next Tutorial »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test