Sunday, 22 June 2008

Explain IN operator in SQL Server.

The IN operator is used to compare a column with one or more value. It is similar to OR condition.

Ex :
Select EmployeeName, EmployeeID
from Employees
where City in (‘Chennai’, ‘Bangalore’)


This Query will display the Employee Name, Employee ID only from city “Chennai” and “Bangalore”.

Labels:


Bookmark this Blog in your Favorites