怎样取表里的第N条记录啊?
怎样取表里的第N条记录啊?论坛里的方法不对啊!
查询第xxx行数据
假设id是主键:
select *
from (select top xxx * from yourtable) aa
where not exists(select 1 from (select top xxx-1 * from yourtable) bb where aa.id=bb.id)
出来的是空表
怎样取表里的第N条记录啊?论坛里的方法不对啊!
查询第xxx行数据
假设id是主键:
select *
from (select top xxx * from yourtable) aa
where not exists(select 1 from (select top xxx-1 * from yourtable) bb where aa.id=bb.id)
出来的是空表
谢谢你了