SAVEPOINT

Now we will see how savepoint is used in COMMIT and ROLLBACK.

Savepoint:
  • Way of implementing subtranction .
Syntax:

Savepoint name;

Here Savepoint is a keyword used for creating the savepoint name is name of savepoint to be created.all changes made  after a savepoint has been declared can be undone by issuing  the ROLLBACK to a savepoint name .we can use it save the changes permanently by issuing the COMMIT to a savepoint name.

Example:

  Lets say we create a savepoint ‘s’ by issuing the following statement

Savepoint s;


 Now we are going to update different coloumn by update statement

Update emp set salary=salary+100;

Update emp set emp_contactno=’9830755710’ where emp_name=’abhishek’;


Finally we can leave the above changes by issuing the

Rollback to savepoint s ;

This will discard all the above changes made to database upto the savepoint s.
If we want to store the chages permanently to the database then we can use the commit command instead of rollback like this

Commit to savepoint s;

This will save all the above changes made to database upto the savepoint s.

Related Article:
   I am interested in hearing your feedback, so that I can improve my articles and learning resources for you.connect with us on facebooktwitter

Share

Did you enjoy reading this and found it useful? If so, please share it with your friends:

3 comments:

  1. Je fais un copier coller dans mon agenda pour ne pas oublier et
    mettre en pratique. merci

    Take a look at my webpage ... Candice

    ReplyDelete
  2. Application FormUnlike other application forms, anԁ wait for their neхt payday.
    Zаc Gillam from Consumer Action Laω stated
    that" The growth and popularity of Loan is a fast and affordable way of meeting sudden expenses. It doesn't, however, he can go for Loan instant and smooth the way to get higher, staying afloat is becoming an impossible task for many. Always be sure that they understand the terms youare agreeing to. 6 month loans do not require any documentation or paperwork.

    My web page :: ameriloan.com (slideshare.Net)

    ReplyDelete
  3. Hi there, I found your web site by the use of Google whilst searching for a related subject,
    your site came up, it seems to be good. I've bookmarked it in my google bookmarks.

    Hello there, simply was aware of your weblog through Google, and found
    that it is really informative. I am going to be careful
    for brussels. I will be grateful should
    you continue this in future. Numerous folks shall be benefited out of your writing.
    Cheers!

    Feel free to visit my homepage :: 500 fast cash

    ReplyDelete