create table dept_test2 as select * from dept;
delete from dept_test2 purge;
savepoint sl;
delete from dept_test where deptno=40;
select * from dept_test;
savepoint s2;
delete from dept_test where deptno=30;
select * from dept_test;
savepoint s3;
delete from dept_test where deptno=20;
select * from dept_test;
2.ROLLBACK / Commit
record 복원
ROLLBACK to s1;
--commit : db 반영(roll back 불가)
delete from dept_test2;
select from dept_test2;
delete from dept_test2 where deptno=40;
savepoint s4;
delete from dept_test2 where deptno=30;
rollback to s4;
select from dept_test2;
commit;
Transaction
1.savepoint
2.ROLLBACK / Commit
--commit : db 반영(roll back 불가) delete from dept_test2; select from dept_test2; delete from dept_test2 where deptno=40; savepoint s4; delete from dept_test2 where deptno=30; rollback to s4; select from dept_test2; commit;