What is SAVE POINT ?

For  long  transactions  that  contain  many  SQL  statements, intermediate markers  or  savepoints  can  be  declared  which  can  be used to divide a transaction  into  smaller  parts.  This allows the option of later rolling back  all  work  performed  from  the current point in the transaction to a declared savepoint within the transaction.

Showing Answers 1 - 3 of 3 Answers

SavePoint:  this is also a TCL command, which puts break points between DML statements so that you can rollback to any point and keeping some part of transaction in process.

example

update emp set sal = 500 + sal;

savepoint a

inser into emp values(.......);

savepoint b

delete from employees where employee_id = 102

rollback to a ;

this rollback will not save changes for last two statements and transaction of first statement will be available for commiting /rollback.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions