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”.
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: IN condition in SQL Server