Database Reference
In-Depth Information
2. Retrieve the current SCN from the database. This is for reference, so make a note of it:
SQL> select current_scn from v$database;
CURRENT_SCN
------- 623411
3. Query the employees table to verify the current salary for the employee with an
employee_id = 110 :
SQL> select employee_id, salary
from employees
where employee_id = 110;
EMPLOYEE_ID SALARY
------ ------
110 8200
4. Update the employees table as shown. Be sure to commit the change too:
SQL> update employees set salary=4000 where
employee_id = 110;
1 row updated.
SQL> commit;
Commit complete.
5. Query the employees table to verify the new salary for our sample employee:
SQL> select employee_id, salary
from employees
where employee_id = 110;
EMPLOYEE_ID SALARY
----------- ----------
110 4000
6. Perform a Flashback Table operation to recover the table to the SCN retrieved in step 2:
SQL> flashback table employees
to scn 623411;
Search WWH ::




Custom Search