Imagine the following scenario:
I am using SQL Server 2005. I have a transaction that is calling, among other SQL statements, a stored procedure that also has a tran
Yes the stored procedure will be rolled back.
Here is the overall flow of your code:
BEGIN TRY
BEGIN TRANSACTION
EXEC SotredProcedureName
--Do some other activity
COMMIT TRANSACTION
END TRY
BEGIN CATCH
--IF an error occurs then rollback the current transaction, which includes the stored procedure code.
ROLLBACK TRANSACTION
END CATCH
Cheers, John