请教1个SQL语句怎么写 我的需求是在ORACLE的一张表里面获取如第1条到第20000条数据,第20000条到第40000条记录,按批次把所要记录都打印出来 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 表中有无唯一标识的字段,如果没有,可以考虑用排名函数 OR ROWID 没明白你的意思,用rownum不行么?select * from (select rownum,t.* from table t) where rownum>=20000 and rownum<=40000自己做个循环 就是SQL分页吧? 楼上的那个 用rownum select 批次 from 表 where rownum<=10000union allselect 批次 from 表 where rownum>=20000 and rownum<=40000; where 后面的 rownum可以这样写吗, 要对T 里面的取个别名吧, select XX from 表 where rownum<=10000;select XX from 表 where rownum>=20000 and rownum<=40000; select * from (select t.*, rownum rn from t order by rowid) t1 where t1.rn between 1 and 2000; --第1条到第2000条 求大侠解决我的数据库重建的疑问 数据类型number(m,n)中n的具体含义是什么? SQL查询语句 菜鸟急等!!请高手回答... 在procedure中动态执行drop和create sequence的语句,报权限不足,急!!! ORACLE 8。0。5升级到ORACLE 9I后,速度明显变慢,是什么原因呢? 怎樣限制只能往oracle table中添加數據行,不能刪除行 Oracle无法初始化参数子系统是怎么回事? 一个菜菜的查询问题 Oracle中存儲過程請教! plSQL语句出错,求助!! ORALCE 脚本
union all
select 批次 from 表 where rownum>=20000 and rownum<=40000;
where 后面的 rownum可以这样写吗, 要对T 里面的取个别名吧,
select XX from 表 where rownum>=20000 and rownum<=40000;
from (select t.*, rownum rn from t order by rowid) t1
where t1.rn between 1 and 2000; --第1条到第2000条