Creating a User-Defined Error Message
10>
11> -- Creating the new message
12> EXEC sp_addmessage
13> 100001,
14> 14,
15> N'The current table %s is not updateable by your group!'
16> GO
1>
2> -- Using the new message (RAISERROR reviewed in the next recipe)
3> RAISERROR (100001, 14, 1, N'YourTableName')
4> GO
Related examples in the same category