SQLServer IN clause
Simple IN clause
To get records having any of the given ids
select *
from products
where id in (1,8,3)
The query above is equal to
select *
from products
where id = 1
or id = 8
or id = 3
select *
from products
where id in (1,8,3)
select *
from products
where id = 1
or id = 8
or id = 3
In this page (written and validated by A. Gawali) you learned about SQLServer IN clause . What's Next? If you are interested in completing SQLServer tutorial, your next topic will be learning about: SQLServer Filter results using WHERE and HAVING.
Share On: |