How Roll back works

The User is doing below steps:
1) Creating one table with the table name as Temp.
2) Creating table as ABC.
3) Inserting 10 rows in the Temp table.
4) selectin * from Temp
5) Deleting 5 rows from Temp table
6) Rollback.
Will it rollback all of the steps done i.e from 1-6.
Or will it roll back only the 6th Step.
Please help me getting solution as i am unable to undersand it.
As per me only the last step should be rolledback.

Let's make it clear...
DML = Data Manipulation Language
This consists of INSERT, UPDATE and DELETE. Also SELECT gets put into this category even though it is not really manipulating the data on the database.
DDL = Data Definition Language
Essentially, any database defining statement that is not DML.
DDL statements automatically issue a "commit" before and after they execute.
Transactions on a database are defined as what occurs between one commit and another.
A Rollback statement will roll back any statements in the current transaction.
Therefore if you issue DDL statements you are causing a commit to occur on the database so any subsequent rollback statement will only roll back to the point of the last commit (i.e. just after the last DDL statement or after the last explicit commit)
1. create table ....                    <--- DDL (implicit) commit
2. create table ....                    <--- DDL (implicit) commit
3. insert into ....                     <--- DML (first statement in transaction)
4. select ....                          <--- DML (second statement in transaction)
5. delete from ....                     <--- DML (third statement in transaction)
6. Rollback                             <--- Rolls back the transaction i.e. everything back to 3

Similar Messages

  • Differences between Commit work, Logical Unit of Work and Roll back work

    Hi all,
    Can any one explain me in details what is the difference between Commit Work, Logical Unit of Work and Roll back work. Pls explain by providing some example.
    and also explain me where and when these are used and what are the importance of using these.
    Thanks in advance.
    Regards
    Ramana Prasad.T

    Hi Ramana Prasad,
    A Logical Unit of Work (LUW or database transaction) is an inseparable sequence of database operations which must be executed either in its entirety or not at all. For the database system, it thus constitutes a unit.
    LUWs help to guarantee database integrity. When an LUW has been successfully concluded, the database is once again in a correct state. If, however, an error occurs within an LUW, all database changes made since the beginning of the LUW are canceled and the database is then in the same state as before the LUW started.
    An LUW begins
    o each time you start a transaction
    o when the database changes of the previous LUW have been confirmed (database
    commit) or
    o when the database changes of the previous LUW have been cancelled (database rollback)
    An LUW ends
    o when the database changes have been confirmed (database commit) or
    o when the database changes have been canceled (database rollback)
    COMMIT WORK.
    Executes a database commit and thus closes a logical processing unit or Logical Unit of Work ( LUW ) (see also Transaction processing ). This means that
    all database changes are made irrevocable and cannot be reversed with ROLLBACK WORK and
    all database locks are released.
    COMMIT WORK also
    calls the subroutines specified by PERFORM ... ON COMMIT * executes asynchronously any update requests (see CALL FUNCTION ... IN UPDATE TASK ) specified in these subroutines or started just before,
    processes the function modules specified in CALL FUNCTION ... IN BACKGROUND TASK ,
    cancels all existing locks (see SAP locking concept ) if no update requests exist,
    closes all open database cursors (see OPEN CURSOR ) and
    resets the time slice counter to 0.
    COMMIT WORK belongs to the Open SQL command set.
    Return code value
    The SY-SUBRC is set to 0.
    ROLLBACK WORK.
    Closes a logical processing unit by reversing all database changes made since the last COMMIT .
    You use this statement if you cannot be certain that all the database changes have been executed correctly.
    The update routines are not performed.
    ROLLBACK WORK belongs to the Open SQL command set.
    Note
    If the ROLLBACK statement occurs within a SELECT loop, the processing cannot continue because the database cursor is invalid. After the ROLLBACK statement, you should therefore ensure that all SELECT processing has been explicitly terminated.
    <b>Plz. Avoid Duplicate Threads.</b>
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • ROLL BACK WORK

    Hii All how to roll back from CALL TRANSACTION?
    or is there any BAPI for source list maintain for ME01 other than BAPI_SOURCEDETERMIN_GETSOS.
    so that i can roll back ME01 updation.?

    hi..
      you can use
         CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'
                     IMPORTING
                          return = i_return1.

  • Installed FF 33.0, & now embedded images and videos on websites are blank. How fix? How roll-back to 32.0.3?

    I installed FF 33.0, and "OpenH264 Video Codec by Cisco Systems, Inc. 1.1" plug-in installed itself automatically. Did that cause this problem? I set it to "Never Activate," which seems to have disabled it, but the problem persists. Do I need H264 for any reason? If not, can I uninstall it, and if so, how? Also, how do I revert FF to a previous verson? V. 33.0 seems to have caused this problem, whether it's due to H264 codec or something else in this version. There seems to be some incompatiblity somehow that wasn't there before -- what can I do to fix this?

    Are they blank or black? If they are black I would recommend disabling hardware acceleration. [[Upgrade your graphics drivers to use hardware acceleration and WebGL]]
    This does not cause an issue, it adds to the variety of codec types Firefox can render.

  • In background job  how commit & rollback work works?

    Hello Friends,
         My requirement is, to fetch all sales order items based on some condition and load them into one table say OCC1 in job J1. Now the second requirement is to upload the job information J1 with job name, user name, end date in second table say OCC2 in job J2.
         My question is if there is some error I found while processing job 2 I have to rollback entire work which means I have to remove all records those I have inserted in to table OCC1. Can any one suggest me how to handle such problem? Some how I am able to create two job and update the tables. However, what about rollback work? Whether there is an implicit commit work after every background job? I am working on SAP 4.6C version.
    Thanks,
    Amol C.

    I think by using just ROLL BACK work it will not rollback your first job's data.
    You need to make some mechanism which can delete the data from OCC1 if the J2 got error.
    Regards,
    Naimesh Patel

  • How to roll back to the good last vershion where plugins work

    how to roll back to the good last vershion that all plugins work ok
    as 4.0 freezes with some sites.

    You can install previous version of Firefox from [http://www.mozilla.com/en-US/firefox/all-older.html here].
    <BR>For installation instructions, see this article: [[Installing a previous version of Firefox]].

  • How do I roll-back to the previous version of Firefox? An auto update occurred and now one of the programs used at the office (ACT! v6.0 SwiftMail) won't run with the browser.

    The office I work in uses a very old version of ACT!, an accounting package. This package has a component called SwiftPage, an antiquated email system that enables us to email from the ACT DB. SwiftPage runs via the web browser.
    Firefox just did an auto update (that I will have to find out how to turn off) and now SwiftPage won't run as it is not compatible.
    Can I "roll-back" my version of Firefox or do I have to uninstall and try to re-install an older version?
    HELP!

    Try loading and using the add-on from this link: https://addons.mozilla.org/en-US/firefox/addon/add-on-compatibility-reporter/
    Many add-ons do in fact work if you force them to run. The procedure to roll-back is given in this article: [[installing previous versions of firefox]]
    Unfortunately the official Firefox policy is that you downgrade to 3.6 which is supported for a while longer, and not the now unsupported Firefox 4. If after installing and running the ''add-on compatibility reporter'' you still have problems there are ways around the official policy.
    I think it is absurd that Firefox 4 may be used by tens of millions of users one day and a few days later those that upgrade to Firefox 5 should be not only told not to use a now unsupported browser, if they need to revert due to problems, but are actually obstructed in attempts to do so. See also [/questions/840397#answer-205154]

  • TS1398 My iPhone 5s can no longer use Internet on a wifi network. I've reset everything, how can I roll back to iOS 7?

    My iPhone 5s can no longer use Internet on a wifi network. I've reset everything, how can I roll back to iOS 7?
    i Was considerinf buying a macbook pro, but am reconsidering spending such an amount of money on a company that can screw up such a basic function. I mean you can have your iOS 8 back if this is what it means, I don't want to use your health Kit app.

    You cannot 'roll back' your iOS.  That's never been supported or allowed by Apple (with only one exception).
    Use this article: iOS: Troubleshooting Wi-Fi networks and connections - Apple
    It's not the iOS.  It may be a setting on your iPhone or the wi-fi network, or a hardware issue.  But it's not the iOS.  If it was, then everyone's iPhone 5S using the same iOS would not be working, and that's not the case.
    Troubleshoot your issue.

  • Cannot install itunes for windows 7 (64), repeatedly get "Roll back" and told to reinstall, but this does not work.  Tried the latest ITunes 11 for 64.  Same problem.   I have an ipad which works OK.  HELP

    Unable to use iTunes for about a month on my PC
    Have PC with windows 7 (64)
    Own an iPad2, which is working with no problems
    When I try to install iTunes it repeatedly fails via "Roll back"  Tells me to reinstall, which does not work.
    Tried latest update iTunes 11, same problem
    Prepared to uninstall iTunes and start all over again, but how do I do this?

    hi mate i think i may have just solved this for you. had the same problem as you, i uninstalled all apple products and quicktime and safari, did a disk clean up and deleted old restore points(might not need to but did it anyway) downloaded itunes from explorer and managed to install the new itunes 11 wooohooooo hope this helps buddy

  • How do I roll back to an earlier version of Safari in Snow Leopard?

    I recently applied the recent snow leopard update including safari 5.1.   Now the juniper vpn no longer recoginzes safari.   How do I roll back to the previous version of safari? (5.0.5?)

    Solved.  (well actually worked around).    Downloaded pacifist (http://www.charlessoft.com/) downloaded the SL dmg (http://appldnld.apple.com.edgesuite.net/content.info.apple.com/Safari5/041-0564. 20110413.Fi9pb/Safari5.0.5SnowLeopard.dmg) Opened the dmg in pacifist, right clicked on package and installed to default location.    I am now able to run the juniper vpn

  • How can I roll back a java update?

    This morning we did our monthly take-down-the-server-run-all-the-software-updates, and it included "Java for Mac OS X 10.6 Update 16"  Now our java software is totally hosed.
    How do we roll back to the previous version of java?

    We used Pacifist ( http://www.charlessoft.com/ ) to re-install the java Update14
    This is shareware and he asks for $20.  We are sending him $100!!!!
    -- that's us doing the happy dance!!!
    (We have Update15, but, a) apple has removed it from the support downloads site, and b) 16 came really fast after 15 -- so I suspect that 15 is broken somehow.  The guessing game is a little annoying -- an article on the support page that would come up when you search for java for 10.6 update 15 saying that apple has removed the update and don't install it if you downloaded it would be, well, courteous!)
    Note -- this seems to have worked just fine to clean up whatever update 16 broke for us, but I suspect that we could have used pacifist to install updates 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 and then 14 and been really really likely to undo whatever bad thing update 16 did.
    Another note...  Got into this mess because I was trying to minimize downtime.  I've never had a problem with a java update before so I got greedy/sloppy.  Sure plenty of OTHER people have had problems with java updates, but, well, what is that old saying?
    Smart People learn from their mistakes.  And Really Smart People learn from other people's mistakes!
    So, if you can't be Really Smart, at least be Smart!

  • How to roll back changes made by other user in nwdi?

    hi all
    my doubt is.
    if there are errors in the WD NWDI project (cause developer before me had deleted/ added some of the code which is causing those errors).
    how to  roll back the code changes which were made by other user.
    i think through sync option but  when we sync to a earlier date we cant check out the code to make changes.
    help me.

    thanks rohit.
    but if there are changes in the context, i mean if one more attribute is created and it is been used a UI element.
    then the above process works.
    My doubt is.
        src folder(configuration,packages,mimes)
    Will these file contain all the code including  the context attributes and the mapping informatin and every thing else.
    (except Libs)???????
    can you plz tell me where the context attributes and mapping informantion and source code and model information are stored (in which folder).
    thanks in advance

  • How Do I roll-back to Version 6.0.5?

    iTunes 7 is despicable. It crashes on me every other minute, and has to go. I tried rolling back to Version 6.0.5, but now I get a message that reads:
    The file "iTunes Library.itl" cannot be read because it was created by a newer version of iTunes.
    I've completely uninstalled the evil Vs. 7 and made sure all Apple updater files were removed too, so why are bits of it lurking in my pc stopping me from getting my music back?
    This is a nightmare. 2nd total iPod nightmare. I'm very close to calling it quits with this junk.
    Please help!!!

    Excellent....I did a search for the file name and then opened containing folder and deleted it all.
    Version 6.0.5 is working fine like it did before.
    I cannot believe how bad Version 7 was on my PC.

  • How do I roll back Acrobat DC to previous version?

    All of my Acrobat plugins stopped working when I updated to Acrobat DC and I cannot find a way to roll back to a previous version. Most other apps can be rolled back, but I cannot see where Acrobat can. How can I do this?
    Thank you,
    DE

    Hi d.eggers,
    Sorry to hear that Acrobat DC didn't work out for you. Please see https://helpx.adobe.com/creative-cloud/kb/acrobat-dc-uninstalls-acrobat-11.html.
    Let us know if you have additional questions.
    Best,
    Sara

  • How do I roll back to 5.0 since beta 6.0 removed disabled most of my plugins?

    I need to know how to roll back to 5.0 the beta 6.0 disabled almost all of my extensions.

    Excellent....I did a search for the file name and then opened containing folder and deleted it all.
    Version 6.0.5 is working fine like it did before.
    I cannot believe how bad Version 7 was on my PC.

Maybe you are looking for

  • Dialog boxes freeze

    The past few days whenever I get a dialog box, the dialog box freezes. I can't click OK, cancel or any other option in the box. I can't click out of the box, nor can I close the browser. I have to close Firefox through the task manager.

  • Can I get my iPhone5 which I buy in China,repaired for free in US

    I bought my iPhone 5 in China can I get it repair for free in US? It is still in its warranty period.

  • CS6 Error messages on startup

    Intermittently, when starting up CS6 in Windows  7 x(64) I get 2 error messages.  I reply OK and CS6 starts up and runs error free. It happens very infrequently about 1 out of 15-20 startups.  I would like to eliminate the errors but have no idea how

  • Portlets for e-mail integration?

    During OOW2000, Oracle-staff giving presentations mentioned the development of portlets for integration with e-mail systems (like Lotus Notes and Microsoft Exchange). Technical staff at the campgrounds said that this functionality was close to releas

  • Beryl and "Show window list" icon problem

    If I enable "Show window list" in application switcher I get some sort of minimized application after switching between apps. I'm using XFCE and I made my minimized windows go on my desktop and using this application switcher means I get an icon labe