select * from Orders
where OrderID in (1724, 1722, 1710)
order by OrderID desc
In the course of using this query, we might try input it's values as parameters.
select * from Orders
where OrderID in (@ord1, @ord2, @ord3)
order by OrderID desc
But we don't always know how many of them there are. For this case we need what is called a table valued parameter - or a list parameter.
...
Bryan Valencia is a contributing editor and founder of Visual Studio Journey. He owns and operates Software Services, a web design and hosting company in Manteca, California.
No comments:
Post a Comment