Deleted Row

Discussion in 'MySQL' started by cancer10, Feb 11, 2009.

  1. #1
    Hi

    I have accidentally deleted one row from one of my table in MySQL database. Is there anyway i can get that row back?

    And no, i do not have a backup.


    Thanx
     
    cancer10, Feb 11, 2009 IP
  2. DomainCo.US

    DomainCo.US Well-Known Member

    Messages:
    2,124
    Likes Received:
    18
    Best Answers:
    0
    Trophy Points:
    100
    #2
    you can try rollback command if it isn't committed...
     
    DomainCo.US, Feb 11, 2009 IP
  3. cancer10

    cancer10 Guest

    Messages:
    364
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Sorry? whats a rollback?
     
    cancer10, Feb 11, 2009 IP
  4. MayurGondaliya

    MayurGondaliya Well-Known Member

    Messages:
    1,233
    Likes Received:
    38
    Best Answers:
    0
    Trophy Points:
    170
    #4
    Rollback is a process of restoring database' previous state. However, the checkpoint has to be set prior to the change in the database.
    Commit is a process of committing a change in the database. Once the database operation has been commited. It is not possible to start rollback process.
     
    MayurGondaliya, Feb 11, 2009 IP
  5. shahpari

    shahpari Active Member

    Messages:
    121
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #5
    rollback is an operation which returns the database to some previous state.
    u may be fire like following SQLquery

    BEGIN TRANSACTION [transaction_name]
    ...
    SQL Statement(s)
    SAVE TRANSACTION savepoint_name
    SQL Statement(s)
    ROLLBACK TRANSACTION savepoint_name
     
    shahpari, Feb 14, 2009 IP
  6. cancer10

    cancer10 Guest

    Messages:
    364
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    So suppose if I m making a payment transfer system. I want mysql to only rollback if all the transaction is NOT completed else do a COMMIT. How do I query this in mysql?
     
    cancer10, Feb 14, 2009 IP