You set the date and time you want to view. Then, any SQL query you run operates on
data as it existed at that time. If you are an authorized user, then you can correct
errors and back out the restored data without needing the intervention of an
administrator.
With the AS OF SQL clause, you can choose different snapshots for each table in the
query. Associating a snapshot with a table is known as table decoration. If you do not
decorate a table with a snapshot, then a default snapshot is used for it. All tables
without a specified snapshot get the same default snapshot.
For example, suppose you want to write a query to find all the new customer accounts
created in the past hour. You could do set operations on two instances of the same
table decorated with different AS OF clauses.
DML and DDL operations can use table decoration to choose snapshots within
subqueries. Operations such as INSERT TABLE AS SELECT and CREATE TABLE AS
SELECT can be used with table decoration in the subqueries to repair tables from
which rows have been mistakenly deleted. Table decoration can be any arbitrary
expression: a bind variable, a constant, a string, date operations, and so on. You can
open a cursor and dynamically bind a snapshot value (a timestamp or an SCN) to
decorate a table with.
Oracle闪回查询II
1. 可以使用as of子句为每张表选择不同的快照 , 可被认为是表装饰
2. DML 及 DDL 操作可以在其子查询中使用表修饰来选择快照.
INSERT TABLE AS SELECT 及 CREATE TABLE AS SELECT 操作可以用于恢复误删除的数据
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/10599713/viewspace-993546/ ,如需转载,请注明出处,否则将追究法律责任。