Hi all,
I have a simple TSQL question that I'm hoping someone can help with.
In the following query:
BEGIN TRANSACTION
UPDATE Properties
SET EstateID = null
WHERE Properties.EstateID = @.ID
DELETE FROM Estates
WHERE [ID] = @.ID
COMMIT TRANSACTION
I'm wondering, if there is some sort of error, will a rollback occur automat
ically
or do I need to put in some sort of error handling code and an explicit roll
back
command?
Any advice would be much appreciated
Kindest Regards
SimonCheck out SET XACT_ABORT in BOL|||Erland Sommarskog has two great (=must-read) articles on error-handling:
http://www.sommarskog.se/error-handling-I.html
http://www.sommarskog.se/error-handling-II.html
ML
http://milambda.blogspot.com/
Friday, March 9, 2012
Quick Question on Transactions
Labels:
database,
estateid,
following,
microsoft,
mysql,
oracle,
propertiesset,
querybegin,
server,
sql,
transactions,
transactionupdate,
tsql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment