1、
SQL> select count(*) from t as of timestamp to_timestamp('2015-05-20 12:00:00','YYYY-MM-DD HH24:MI:SS');
select count(*) from t as of timestamp to_timestamp('2015-05-20 12:00:00','YYYY-MM-DD HH24:MI:SS')
*
ERROR at line 1:
ORA-08186: invalid timestamp specified
SYSDATE
-------------------
2015-05-20 02:13:28
如果指定一个未来的时间就会报以上的错误
2、
SQL> select count(*) from t as of timestamp to_timestamp('2015-05-19 12:00:00','YYYY-MM-DD HH24:MI:SS');
select count(*) from t as of timestamp to_timestamp('2015-05-19 12:00:00','YYYY-MM-DD HH24:MI:SS')
*
ERROR at line 1:
ORA-01466: unable to read data - table definition has changed
报错的原因,是因为在该时间点,表还没有创建
SQL> select count(*) from t as of timestamp to_timestamp('2015-05-20 02:00:00','YYYY-MM-DD HH24:MI:SS');
COUNT(*)
----------
72511