Did you find this useful?
Socialize it today.


SQL IN Operator

Thursday, November 17, 2011

tags SQL

The IN operator is used in a WHERE clause. It allows you to specify multiple values.


Syntax

SELECT column_name(s)
FROM table_name
WHERE column_name IN (value1,value2,...)


Example

Search for records that contain 'Joe', 'Fred' or 'Tim' in the column 'firstName'.


SELECT * FROM Customers
WHERE firstName IN ('Joe','Fred', 'Tim')

Please help us spread the word by socializing it today!

email contact us

Did you find something wrong with the information on this page? Please take a moment to report it to us so that we can continue to improve the quality of the information on this site. Click here to report an issue with this page.



Recommended Books & Training Resources

Head First SQL: Your Brain on SQL A Learners Guide SQL Cookbook