1.根据ROWID来分,个人喜欢这种,换下函数名称后可用于MSSQL与ORACLE
select * from TABLE1 where rowid in
(
select rid from
(
select rownum rn,rid from
(
select rowid rid,cid from TABLE1 order by cid desc
)
where rownum<10000
)
where rn>9980)
order by cid desc;
时间: 2024-10-10 20:48:29