How does SQL Server treat statements inside stored procedures with respect to transactions?
Posted
by Sleepless
on Stack Overflow
See other posts from Stack Overflow
or by Sleepless
Published on 2010-04-12T12:40:10Z
Indexed on
2010/04/12
12:43 UTC
Read the original article
Hit count: 312
Hi All!
Say I have a stored procedure consisting of several seperate SELECT, INSERT, UPDATE and DELETE statements. There is no explicit BEGIN TRANS / COMMIT TRANS / ROLLBACK TRANS logic.
How will SQL Server handle this stored procedure transaction-wise? Will there be an implicit connection for each statement? Or will there be one transaction for the stored procedure?
Also, how could I have found this out on my own using T-SQL and / or SQL Server Management Studio?
Thanks!
© Stack Overflow or respective owner