如果这个问题对你很关键, 那么你不应该这么用, 不要依赖这个次序!如果不关键, 还问这个问题干什么?:)
开个玩笑.应该按照rowid顺序.
下面是一个小实验:scott@O817> truncate table t;表已截掉。scott@O817> insert into t values (1);已创建 1 行。scott@O817> insert into t values (2);已创建 1 行。scott@O817> insert into t values (3);已创建 1 行。scott@O817> commit;提交完成。scott@O817> delete t where a=2;已删除 1 行。scott@O817>
scott@O817> commit;提交完成。scott@O817> insert into t values(4);已创建 1 行。scott@O817> commit;提交完成。scott@O817> select * from t; A
----------
1
3
4scott@O817> select t.*, rowid from t; A ROWID
---------- ------------------
1 AAAIC9AADAAABIjAAA
3 AAAIC9AADAAABIjAAC
4 AAAIC9AADAAABIjAADscott@O817>
可见, 并没有按照插入顺序.
===========================
oldwain
---------------------------
http://www.itpub.net/index.php?referrerid=32
http://www.linuxforum.net/
http://www.oraclefan.net/
开个玩笑.应该按照rowid顺序.
下面是一个小实验:scott@O817> truncate table t;表已截掉。scott@O817> insert into t values (1);已创建 1 行。scott@O817> insert into t values (2);已创建 1 行。scott@O817> insert into t values (3);已创建 1 行。scott@O817> commit;提交完成。scott@O817> delete t where a=2;已删除 1 行。scott@O817>
scott@O817> commit;提交完成。scott@O817> insert into t values(4);已创建 1 行。scott@O817> commit;提交完成。scott@O817> select * from t; A
----------
1
3
4scott@O817> select t.*, rowid from t; A ROWID
---------- ------------------
1 AAAIC9AADAAABIjAAA
3 AAAIC9AADAAABIjAAC
4 AAAIC9AADAAABIjAADscott@O817>
可见, 并没有按照插入顺序.
===========================
oldwain
---------------------------
http://www.itpub.net/index.php?referrerid=32
http://www.linuxforum.net/
http://www.oraclefan.net/
解决方案 »
- 怎么出来两个之间的数据同步问题?
- 我想实现这样目的:当输入id时显示对就id的内容,不输入时全部显示
- 急问:8i下通过dblink调用9i的存储过程报错ora-02085,ora-512
- 怎样导出一个用户的所有表?
- 寻找nvl置0的替代方法
- Oracle中,取Date时发生的灵异事件。。。高手请进
- 100分跪求一个高难SQL文的写法。
- 请帮帮忙 如何从一个表中取得班级中人数大于50的所有班级字段
- 菜鸟问题~
- 如何在分区表上建立位图索引?(分区索引)在线等待~!高分相送!
- developer2000的疑惑
- 高手指教:我用pb的数据窗口将oracle8里的数据倒进oracle9里,没有加条件,但就是少了很多。高手指教
昨天写的匆忙, 举的例子不恰当.可以如下实验: (输出结果太长, 不再贴出)drop table t;
create table t(a number);
insert into t select rownum from all_objects;
commit;
delete t where a< [rowcount-10] ;
commit;
insert into t select rownum from all_objects where rownum < [rowcount-10];select a, rowid from t;