Welcome to WebmasterServe!

FREE TO JOIN! Join us now to engage in informative and friendly discussions about Webmastering, SEO, SEM, Internet Marketing, Programming, Graphic Design, Online Jobs and more. What are you waiting for? Ready to join our friendly community? It takes just one minute to register.

Dismiss Notice

Join WebmasterServe Forums 
Join the discussion! Have a better idea or an opinion? It takes just one minute to register Click Here to Join

Help Me/Question What Is Rollback And Commit?

Discussion in 'Database Management' started by Doominic anderson, Feb 23, 2016.

  1. Doominic anderson

    Yellow Belt

    Joined:
    Jan 30, 2016
    Messages:
    399
    Ratings:
    +21 / -0
    In SQL DDL,DML,DCL languages are used to manage the whole database,one more language is TCL.
    TCL stands for Transaction Control Language,these commands are used to manage the transactions in the database.These are mainly used to manage the changes which is made by DML statements.
    TCL commands are Rollback and Commit.
    What is Rollback and Commit,how these are used and why?
     
  2. steve taylor

    Yellow Belt

    Joined:
    Feb 12, 2016
    Messages:
    769
    Ratings:
    +25 / -0
    Transaction have various state these are as follows:-
    Initial State
    Intermediate state
    Partially committed sate and
    Committed state

    If any transaction perform the its all statement successfully including commit statement then the value of data base updated according to new value.
    If transaction fail between intermediate state then database administrator rollback the translation to its initial state.
     
  3. krishatg

    Yellow Belt

    Joined:
    Jan 16, 2016
    Messages:
    240
    Ratings:
    +14 / -0
    There are basically 4 types of languages in SQL, namely DDL,DCL,TCL,DML which are used to manipulate the database.
    In TCL(Transection Control Language) we have COMMIT and ROLLBACK commands.
    COMMIT: commit command is used to store all the values made by the transection in the database.
    ROLLBACK: Rollback command is used to revert all the changes made by the transections in the database.
    Note that once the commit command is used, it can not be rollbacked.
     
  4. VIVEK KUMAR

    Yellow Belt

    Joined:
    Mar 8, 2016
    Messages:
    300
    Ratings:
    +2 / -0
    To achieve consistency database allow to execute transaction completely or not execute.To achieve this, there are two commands in database commit and rollback are used. If transaction perform their all operation successfully then with the help of commit command write the final values of the transaction in the database otherwise rollback command returns all the transaction operation in the initial state.
     
  5. Swati Mishra

    Yellow Belt

    Joined:
    Dec 28, 2015
    Messages:
    644
    Ratings:
    +105 / -0
    The commit command is transnational command which used to save changes in the data, it saves all the data. and the rollback command is used to undo transaction
     
  6. saurabh mathur

    Yellow Belt

    Joined:
    Nov 8, 2017
    Messages:
    130
    Ratings:
    +2 / -0
    Commit- A COMMIT is automatically executed when you exit normally from SQL plus.It does not apply to any SELECT commands as there is nothing to commit.It is not applied to any DDL commands.

    Rollback-A group of related SQL commands that all have to complete successfully or otherwise be rolled back. To under the work that are committed or done by COMMIT clause, for this we use ROLLBACK command.

    web hosting
     

Share This Page