Saturday, April 3, 2010

n th record using sqlserver

declare sc cursor static for select * from system1.dbo.sys_params
declare @n int
set @n=21
open sc
while @n<25
begin
fetch absolute @n from sc
set @N=@N +1
end
close sc
deallocate sc

No comments:

Post a Comment