Reputation: 1425
I am using SQL Server 2014. Can any one tell me that how can i print a specific Error Message in my stored procedure?
Upvotes: 0
Views: 1192
Reputation: 86
Have you tried using Throw? SQL 2014 doesn't support RAISERROR() for native SPs. While Throw is supported.
THROW [ { error_number | @local_variable },
{ message | @local_variable },
{ state | @local_variable } ] [ ; ]
For Example:
THROW 5000, 'THROW TEST', 1
https://msdn.microsoft.com/en-us/library/ee677615.aspx
http://sqlhints.com/2013/06/30/differences-between-raiserror-and-throw-in-sql-server/
Upvotes: 1