Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2004

    Unanswered: how do i roll back a Delete SQL??

    In SQL Server \ Sybase ,
    if i run the command Delete from table blah blah...

    can i roll it back
    1) i have not started any transaction.
    2) i have not commited

    If yes then how to proceed!



  2. #2
    Join Date
    Sep 2004
    Bogota, Colombia

    Lightbulb Not possible...

    By default Sybase ASE uses 'UNCHAINED' transactional mode. What this means is that any data modification command (ie. UPDATE, DELETE, INSERT) is a transaction and will implicitly generate a BEGIN TRAN/COMMIT TRAN.

    This also means, that a normal data modification command (ie. a DELETE), cannot be reverted once it has been executed.

    If you want to change this behaviour, you'll have to do one of the following:

    * Use the SET CHAINED ON command (OFF is the default) -- this will implicitly start a new transaction with the first data modification command you issue. You'll have to explicitly end your transaction with a COMMIT/ROLLBACK command.

    * Use BEGIN TRAN and COMMIT/ROLLBACK to define where your transaction begins / ends.

    Hope this helps,

    Juan Avila
    Last edited by Juank_Avila; 09-02-04 at 19:02.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts