best practises to delete a set of tables in sql 2008

Posted by Hari on Stack Overflow See other posts from Stack Overflow or by Hari
Published on 2010-05-22T15:22:58Z Indexed on 2010/05/22 15:30 UTC
Read the original article Hit count: 136

Filed under:

Basically i want to keep the transaction very simple but i should be able to rollback if any error in the later part. Something like mentioned below,

BEGIN TRANSACTION

DELETE SET 1(this will delete first set of table)

COMMIT

DELETE SET 2 (will delete second set of table)


If any error occurs while deleting set 2 i should be able to rollback set 1 transaction as well.Let me know if we have any options to do like this. Appreciate for your help.

© Stack Overflow or respective owner

Related posts about sql-server