首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

oracle跟sql server分页查询SQL语句

2012-09-01 
oracle和sql server分页查询SQL语句1.Oracle分页sql语句SELECT * FROM (SELECT A.*, ROWNUM RN FROM (sele

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'


2.Sql Server 分页sql语句
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


热点排行