关于rowid

[复制链接]
查看11 | 回复2 | 2009-7-22 09:30:00 | 显示全部楼层 |阅读模式
在较短的时间内按顺序插入数据,每次插入都COMMIT,是否后插入的ROWID要比先插入的ROWID大?

我小测试了一下,但不能肯定是否全部如此:
create table test (a1 number(5),a2 number(5));
insert into test values(1,1);
commit;
select * from test where rowid=(select max(rowid) from test);
A1
A2
1
1
insert into test values(2,2);
commit;
select * from test where rowid=(select max(rowid) from test);
A1
A2
2
2
insert into test values(3,3);
insert into test values(4,4);
commit;
select * from test where rowid=(select max(rowid) from test);
A1
A2
4
4
回复

使用道具 举报

千问 | 2009-7-22 09:30:00 | 显示全部楼层
不一定!
回复

使用道具 举报

千问 | 2009-7-22 09:30:00 | 显示全部楼层
如果这个表在判断之前不删除,只插入删除的时候利用TRUNCATE
这样能否利用ROWID判断插入时间?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行