Friday, June 10, 2022

SQL Server Stored procedure with Begin TRAN and COMMIT TRAN { sql transaction}

 

Create PROCEDURE [dbo].[UPD_STU_REG_TP](

 @Student_registration_id varchar(100)   

,@SPR_No_Doc varchar(500)= null

)  


AS    

BEGIN    

BEGIN TRY    

BEGIN TRAN


UPDATE MST_STUDENT_REG  SET -------- WHERE ----------




COMMIT TRAN  

END TRY    

BEGIN CATCH;    

 SELECT ERROR_MESSAGE();   

ROLLBACK TRAN;   

END CATCH;    

END


No comments:

Post a Comment