Les 08
Les 08
Les 08
1 row created.
4 rows created.
EMPLOYEES
DEPARTMENTS
• Example:
TRUNCATE TABLE copy_emp;
INSERT INTO
(SELECT employee_id, last_name,
email, hire_date, job_id, salary,
department_id
FROM employees
WHERE department_id = 50)
VALUES (99999, 'Taylor', 'DTAYLOR',
TO_DATE('07-JUN-99', 'DD-MON-RR'),
'ST_CLERK', 5000, 50);
1 row created.
Transaction
DELETE
SAVEPOINT A
INSERT
UPDATE
SAVEPOINT B
INSERT
ROLLBACK ROLLBACK ROLLBACK
to SAVEPOINT B to SAVEPOINT A
ROLLBACK;
Rollback complete.
COMMIT;
Commit complete.
User A
UPDATE employees Data
SET salary = 7000 blocks
WHERE last_name = 'Grant';
Undo
segments
Changed
SELECT * and
FROM userA.employees; Read- unchanged
consistent data
image Before
change
(“old” data)
User B