In the real world, where do we use Savepoint command.

Questions by sbagai2001   answers by sbagai2001

Showing Answers 1 - 3 of 3 Answers

satya ranjan pal

  • Jun 5th, 2006
 

Savepoints let you undo selected changes within a transaction. Your application can set any number of savepoints using SQL SAVEPOINT statements, and then use SQL ROLLBACK TO SAVEPOINT statements to indicate which changes within the unit of work to undo. When the application no longer uses a savepoint.

example:

savepoint A

..

..

savepoint b

...

..

rollback to savepoint

  Was this answer useful?  Yes

good question.

remember... you are doing huge work. means assume that you have execute 100 queties. ok . you already finished 50 queries. after executing the 51 query you thaught there is a mistic. what you will do. if you rollback then all the work will be rollbacked.

to overcome this problem they introduced this savepoint consept. after executing some work put one flag and after that one flag. like that. if you want to rollback it then rollback to particular flag.

rollback to savepoint1....

thanks & Regards

Madhu D.

  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