ROWNUM
ROWNUM在数据库中基本只做两件事:
1.查询第一行:select * from * where rownum=1;
2.取得前N行:select * from * where rownum<=n。
》使用rownum=x(x>1)会报错。
》根据基本功能和子查询可以实现查询a-b行记录:
select * from
(
select rownum rn,** from ** where rownum <=b
) temp
where temp.rn>a-1;
God, Grant me the SERENITY, to accept the things I cannot change,
COURAGE to change the things I can, and the WISDOM to know the difference.