Mega Code Archive

 
Categories / MSSQL Tutorial / System Functions
 

Adding a custom error

5> EXEC sp_addmessage 6>     @msgnum = 50005, 7>     @severity = 16, 8>     @msgtext = 'Problem with ProductIds %i, %i, %i' 9> GO Msg 15043, Level 16, State 1, Server J\SQLEXPRESS, Procedure sp_addmessage, Line 137 You must specify 'REPLACE' to overwrite an existing message. 1> 2>