George George

George George

  • NA
  • 778
  • 0

2 basic transaction issues

Jan 16 2009 2:24 AM

Hello everyone,

Two basic questions about transactions,

1. For single SQL insert/update/delete statement, are there any needs or benefits to wrap into a transaction?

2.  I wrote T-SQL like this,

[Code]
BEGIN TRY
Begin Transaction
...
commit
END TRY
BEGIN CATCH
rollback
...
END CATCH
[/Code]

my question is, is it a must to call commit explicitly just before end try statement? Any means to commit transaction automatically after end try statement?

regards,
George


Answers (3)