I'm implementing a mission critical stored procedure that will perform
INSERT and I want to make sure my
TRANSACTION is correctly formed.
I've seen some
TRANSACTION statements where there's a check after each step. I've also seen this kind where the entire set of steps are simply placed within a single
TRANSACTION block without any "check points" along the way.
Is this a well formed
TRANSACTION that will roll back everything i.e.
INSERT, if there's any error at any point.
SET SomeColumnValue = 123
WHERE Id = 123456
DELETE FROM SomeOtherTable
WHERE Id = 789
INSERT INTO ThirdTable
('Hello World', 1234567)