- 论坛徽章:
- 3
|
你的数据库版本是?
看看我的测试过程:
- SQL> create table t(id number,comments varchar2(20));
- Table created.
- SQL> insert into t values(1,'aaa');
- 1 row created.
- SQL> insert into t values(2,'bbbb');
- 1 row created.
- SQL> insert into t values(3,'cccc');
- 1 row created.
- SQL> commit;
- Commit complete.
- SQL> select * from t;
- ID COMMENTS
- ---------- --------------------
- 1 aaa
- 2 bbbb
- 3 cccc
- SQL> select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual;
- TO_CHAR(SYSDATE,'YY
- -------------------
- 2011-01-14 13:20:49
- SQL> delete from t where id=2;
- 1 row deleted.
- SQL> commit;
- Commit complete.
- SQL> select * from t as of timestamp to_timestamp('2011-01-14 13:20:49','yyyy-mm-dd hh24:mi:ss');
- ID COMMENTS
- ---------- --------------------
- 1 aaa
- 2 bbbb
- 3 cccc
- SQL> select * from t as of timestamp to_timestamp('2011-01-14 13:22:40','yyyy-mm-dd hh24:mi:ss');
- ID COMMENTS
- ---------- --------------------
- 1 aaa
- 3 cccc
复制代码 |
|