句_语_SQL_页_分

page: 当前第几页
size:每页显示多少条记录
select * from (select * from (select * from UserInfo where rownum <= page*size order by usId) order by usId desc)
where rownum <= ((select count(*) from UserInfo where rownum <= page*size)-((size-1)*page)) order by usId;


select * from (select * from table where rownum <= page*size order by id) where rownum <= size order by id desc;

你可能感兴趣的:(sql)