Monday, February 8, 2010

SQL IN - Introduction and syntax

Explain the SQL IN statement. Write SQL syntax for the SQL IN statement along with an example.

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

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

Example:
SELECT * FROM employee
WHERE emp_LastName IN ('james','jones')

No comments:

Post a Comment