set nocount on
--建立测试环境并插入数据,并且表没有主键
create table test(id int ,name varchar(10))
insert into test select 999,'jinjazz'
insert into test select 888,'csdn'
insert into test select 999,'sqlserver'
--通过游标获取绝对行数
declare myCursor scroll cursor for select * from test
open myCursor
fetch absolute 3 from myCursor
close myCursor
deallocate myCursor
--删除测试环境
drop table test
set nocount off