3、假设更改了HR用下employees表的某条数据,并且已经提交
SQL> update employees set phone_number='515.123.0987' where employee_id=100;
SQL> commit;
SQL> select employee_id,first_name,last_name,phone_number from employees where last_name = 'King';
EMPLOYEE_ID FIRST_NAME LAST_NAME PHONE_NUMBER
---------------------- ----------------------------- -------------------------------------------------- ----------------------------------------
156 Janette King 011.44.1345.429268
100 Steven King
515.123.4567
4、查询employee_id 为100 的员工未更改前的手机号码,就可以使用AS OF子句的闪回查询技术了,发现更改前号码515.123.4567
SQL> select employee_id,first_name,last_name,phone_number from employees as of scn 4883652 where last_name = 'King';
EMPLOYEE_ID FIRST_NAME LAST_NAME PHONE_NUMBER
---------------------- ----------------------------- -------------------------------------------------- ----------------------------------------
156 Janette King 011.44.1345.429268
100 Steven King
515.123.4567
使用闪回查询技术可以找回错误提交或是修改的数据,避免用户错误。