Skip to content

Instantly share code, notes, and snippets.

@eternaltung
Created February 26, 2015 10:35
Show Gist options
  • Save eternaltung/ccdb84f84f4896343060 to your computer and use it in GitHub Desktop.
Save eternaltung/ccdb84f84f4896343060 to your computer and use it in GitHub Desktop.
CREATE PROCEDURE [dbo].[sp_Test3]
AS
begin try
print 'sp_Test3:updating'
update testTable2 set Num=6 where Id=2
print 'sp_Test3:updated'
end try
begin catch
print 'sp_Test3:in catch'
RAISERROR('raiseerror:sp_Test3', 16, 1)
end catch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment