Using Transaction on Query
BEGIN TRAN
BEGIN TRY
-- Insert all statement
COMMIT TRAN
END TRY
BEGIN CATCH
RAISERROR('Error',16,1)
ROLLBACK TRAN
END CATCH
BEGIN TRY
-- Insert all statement
COMMIT TRAN
END TRY
BEGIN CATCH
RAISERROR('Error',16,1)
ROLLBACK TRAN
END CATCH
Comments
Post a Comment