Does there have any undo or rollback function in SQL server?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gison
    New Member
    • Oct 2007
    • 6

    Does there have any undo or rollback function in SQL server?

    When we update or delete data... it's very serious and seem to no choice to rollback. How does everyone to control this part of situation?

    thanks for the opinion.
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    As you have posted a question in the articles section it is being moved to SQL Server Forum.

    Comment

    • Gison
      New Member
      • Oct 2007
      • 6

      #3
      Originally posted by debasisdas
      As you have posted a question in the articles section it is being moved to SQL Server Forum.
      sorry.. and thank you.

      Comment

      • jamesd0142
        Contributor
        • Sep 2007
        • 471

        #4
        Originally posted by Gison
        When we update or delete data... it's very serious and seem to no choice to rollback. How does everyone to control this part of situation?

        thanks for the opinion.
        im my case i have a backup routine which runs every night, can you not restore from a backup?

        Comment

        • pralay
          New Member
          • Nov 2007
          • 1

          #5
          Originally posted by Gison
          When we update or delete data... it's very serious and seem to no choice to rollback. How does everyone to control this part of situation?

          thanks for the opinion.

          yes. you can use transaction to handle this situation.
          some commands are there

          BEGIN TRANSACTION
          <sql code>
          COMMIT / ROLLBACK TRANSACTION

          for more use the msdn help.

          Comment

          • debasisdas
            Recognized Expert Expert
            • Dec 2006
            • 8119

            #6
            You can always rollback the transaction before commiting it.

            Comment

            Working...