Hello Techies,
Today i am going to learn "how to use Transaction in Stored procedure".
There syntax is simple which is all follows,
Create Proc sp_ProcNameUpdate Table Set Value='Transaction Test' Where ID=@ID
@ID INT
AS
BEGIN
BEGIN TRAN
BEGIN TRY
COMMIT TRANEND TRY
BEGIN CATCH
ROLLBACK TRAN
END CATCH
END
How to use "Transaction and Rollback" in SQL SERVER stored Procedure
Reviewed by Ashwani
on
November 21, 2018
Rating:

No comments:
Post a Comment