oracle和sql server分页查询SQL语句
1.Oracle分页sql语句
SELECT * FROM (SELECT A.*, ROWNUM RN FROM ( select sno,sname,sage,ssex from tb_student where 1=1) A WHERE ROWNUM <'24') WHERE RN >='0'
SELECT sno,sname,sage,ssexFROM ( SELECT ROW_NUMBER() OVER(ORDER BY A.sno ) rownum , A.sno,A.sname,A.sage,A.ssexFROM tb_student A WHERE 1 = 1 ) T WHERE rownum >= 0 AND rownum < 24