hi,
I am writing some stored procedures in T-SQL, the contain both selects and updates. I want to make these transaction safe.
I place a TRANSACTION BEGIN at the start of the procedure, however I use RETURN at various points to exit the procedure based on different conditions.
Where do I place the COMMIT statement? Before each RETURN? Or just at the bottom of the stored procedure?
Thanks in advance
Steve
I am writing some stored procedures in T-SQL, the contain both selects and updates. I want to make these transaction safe.
I place a TRANSACTION BEGIN at the start of the procedure, however I use RETURN at various points to exit the procedure based on different conditions.
Where do I place the COMMIT statement? Before each RETURN? Or just at the bottom of the stored procedure?
Thanks in advance
Steve