Hello
Here are two ways to select number of rows when count is passed in parameter
1. using TOP
declare @count int
set @count = 5
select top(@count) * from temp_Users
2. using ROWCOUNT
declare @count int
set @count = 5
set rowcount @count
select * from temp_Users
Please comment more ways of performing this functionality.
set rowcount 0
Tuesday, August 7, 2007
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment