rowid是该数据行的物理地址
使用rownum
使用rownum
解决方案 »
- 关于 order by 子句里面用到 case when 的例子
- Oracle 中修改了 IDLE_TIME ,需要重新启动吗 ?
- 读入的数据被截断!
- 请教SQL查询语句(Oracle和MSSQL都适用)?
- 大哥大姐进来看一看创建对象带上not instantiable选项为什么会出现这种错误
- 求sql语句(抢分)
- 一个oracle的使用问题
- 我只有redhat linux 9,在家里自学安装和管理oracle,用那个版本的oracle好呢?
- 急救:关于时间问题,怎么回事??
- 求ORACLE命中率太低的解决方法
- Windows2000Pro,P4的计算器安装Oracle的一个疑问.
- 有了ORACLE9i的前三张CD,第四张client是否不用了?
select * from ( select rownum id,tb.* from tb where rownum<400) where id>=390;
但有个问题不理解,就是
假如下如SQL语句返回记录数为7条
select ID,rownum from tUserInfo where status = 1;
为什么:
select ID,rownum from tUserInfo where status = 1 and rownum < 10 ;
select ID,rownum from tUserInfo where status = 1 and rownum < 4 ;是有记录返回的
而下面三个SQL语句
select ID,rownum from tUserInfo where status = 1 and rownum > 1;
select ID,rownum from tUserInfo where status = 1 and (rownum > 1 and rownum < 4);
select * from (select ID,rownum from tUserInfo where status = 1) where (rownum > 1 and rownum < 4)
都是没有记录返回呢?
select * from tbname where rownum >n and rownum <m;这样
select * from (select ID,rownum num from tUserInfo where status = 1) where (num > 1 and num < 4);
谢谢 bzszp(SongZip)兄弟啊,
问题解决,感谢各位的帮忙!
http://www.cnoug.org/bin/ut/threaded_show.cgi?tid=38&pid=77