For RaiseError,the message number should exist in sys.messages( even for custom messages). For Throw(Denali), it will be what?
e.g. if I do as
I will receive
Msg 50002, Level 16, State 5, Line 5 Some custom message.
and we know that the valid range for THROW is between 50000 to 2147483647. That means these custom message numbers will be stored/declared somewhere(in some table)[for RaiseError it is in sys.messages]. So which is it? Although the predefined messages are still from sys.messages
N.B.~ It is for my own understandingThanks
You can continue to use error messages in sys.messages but don't have to:
I will continue to use sys.messages as it allows you to have a set of error messages with a centralised standard message content.
(Please remember that Denali is still in development so things can change from now until release): http://msdn.microsoft.com/en-us/library/ee677615(SQL.110).aspx
answered Feb 13 '11 at 11:52 PM