create table t (x int, y date)
Table created.
insert into t values (1, sysdate)
1 row(s) inserted.
commit
Statement processed.
declare
n number;
begin
for i in 1 .. 500000 loop
n := ln(power(sqrt(i), 3));
end loop;
end;
Statement processed.
insert into t values (2, sysdate)
1 row(s) inserted.
insert into t values (3, sysdate)
1 row(s) inserted.
commit
Statement processed.
select * from t
X | Y |
---|---|
1 | 05-MAY-16 |
2 | 05-MAY-16 |
3 | 05-MAY-16 |
flashback table t to timestamp systimestamp - interval '1' second
ORA-08189: cannot flashback the table because row movement is not enabledMore Details: https://docs.oracle.com/error-help/db/ora-08189
alter table t enable row movement
Table altered.
flashback table t to timestamp systimestamp - interval '1' second
Statement processed.
select * from t
X | Y |
---|---|
1 | 05-MAY-16 |
delete t
1 row(s) deleted.
commit
Statement processed.
select * from t
no data found
select * from t as of timestamp systimestamp - interval '1' second
X | Y |
---|---|
1 | 05-MAY-16 |
insert into t
select * from t as of timestamp systimestamp - interval '1' second
1 row(s) inserted.
update t cur
set (y) = (
select y from t as of timestamp systimestamp - interval '1' second old
where cur.x = old.x
)
1 row(s) updated.
select * from t
X | Y |
---|---|
1 | 05-MAY-16 |
drop table t
Table dropped.
select * from recyclebin
OBJECT_NAME | ORIGINAL_NAME | OPERATION | TYPE | TS_NAME | CREATETIME | DROPTIME | DROPSCN | PARTITION_NAME | CAN_UNDROP | CAN_PURGE | RELATED | BASE_OBJECT | PURGE_OBJECT | SPACE |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
BIN$MhVXYbPqWOzgU5Le5wrKYQ==$0 | T | DROP | TABLE | LIVESQL_USERS | 2016-05-05:01:46:31 | 2016-05-05:01:46:39 | 291195812 | - | YES | YES | 164863 | 164863 | 164863 | 8 |
flashback table t to before drop
Statement processed.
select * from t
X | Y |
---|---|
1 | 05-MAY-16 |
select * from recyclebin
no data found
drop table t
Table dropped.
purge table t
Statement processed.
select * from recyclebin
no data found