ITPub博客

首页 > IT基础架构 > 网络安全 > Retrieve rows in order inserted updated (ora_rowscn)

Retrieve rows in order inserted updated (ora_rowscn)

原创 网络安全 作者:xsb 时间:2007-05-09 11:49:25 0 删除 编辑

upgrading to Oracle 10g and using
CREATE TABLE ... ROWDEPENDENCIES.

That would be better called last touched, not inserted, because for example updates also affects ora_rowscn.

[@more@]

create table tt(id number);
insert into tt values(1);
select ora_rowscn from tt;
commit;
select ora_rowscn from tt;
insert into tt values(2);
select ora_rowscn from tt;
commit;
select ora_rowscn from tt;

create table ttt (id number) rowdependencies;
insert into ttt values(1);
select ora_rowscn from ttt;
commit;
select ora_rowscn from ttt;
insert into ttt values(2);
select ora_rowscn from ttt;
commit;
select ora_rowscn from ttt;
select to_char(scn_to_timestamp(ora_rowscn),'yyyymmdd hh24:mi:ssxff') from ttt;

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12402/viewspace-914144/,如需转载,请注明出处,否则将追究法律责任。

下一篇: expdp
请登录后发表评论 登录
全部评论
  • 博文量
    66
  • 访问量
    3082308