GeekInterview.com
Series: Subject: Topic:
Question: 104 of 190

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

Asked by: sbagai2001 | Member Since May-2006 | Asked on: May 26th, 2006

View all questions by sbagai2001   View all answers by sbagai2001

Showing Answers 1 - 3 of 3 Answers
satya ranjan pal

Answered On : 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

  
Login to rate this answer.

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.

  
Login to rate this answer.

nice reply sir

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.