How to set SQLException Number
问题 I'm having an issue on settin up SqlException.Number On my Stored Proc i'm raising an error --@number = 50001 RAISERROR(@number, 16, 1) - I should expect that the Error_Number() should be @number but I always get 18054 Is there something wrong with my RAISERROR ? 回答1: Check the sys.messages table for error code 74601. if this is a user defined error, it shouold be added in the table. for any error that is greater than 50000 should give you this output if not found. Msg 18054, Level 16, State