select rownum ,deptno,dname loc from dept;
select deptno,dname,loc from dept where rownum=1;
select rowid ,deptno,dname loc from dept;
select max(rowid) ,deptno,dname loc from dept where id=1;
select d.rowid ,d.deptno,d.dname loc from dept d where d.rowid>=5;
分页:
select id,title,name from (select id,title,name rownum rn from dept) a where a.rn>=?and a.rn<=?;
总页数=总记录数/每页显示的记录数;
=总记录数/每页显示的记录数+1;
起始记录数=(当前页码-1)*每页显示的记录数+1;
结束记录数=当前页码*每页显示的记录数;
时间: 2024-10-13 21:31:26