Is there an overview of all SQL Server 2012 error codes?

前端 未结 5 2237
失恋的感觉
失恋的感觉 2021-02-19 00:14

SQLGetDiagRec returns a native error code. Is there anywhere an overview of the error codes of SQL Server 2012? I couldn\'t find anything on MSDN.

5条回答
  •  面向向阳花
    2021-02-19 00:56

    In SQL Server 2005 and above you can use this:

    SELECT * FROM sys.messages
    

    As others have mentioned, you can also use (available in SQL Server 2000):

    SELECT * FROM sysmessages
    

提交回复
热议问题