You can get list of all the error codes or messages using below queries

In SQL Server 2000

Column name Description
error Unique error number.
severity Severity level of the error.
dlevel For internal use only.
description Explanation of the error with placeholders for parameters.
mslangid System message group ID.

In SQL Server 2005 & above

Column name Description
message_id ID of the message. Is unique across server. Message IDs less than 50000 are system messages.
language_id Language ID for which the text in text is used, as defined in syslanguages. This is unique for a specified message_id.
severity Severity level of the message, between 1 and 25. This is the same for all message languages within a message_id.
is_event_logged 1 = Message is event-logged when an error is raised. This is the same for all message languages within a message_id.
text Text of the message used when the corresponding language_id is active.
Yatendrasinh Joddha
I am a software engineer currently living in Gandhinagar, India. My interest is in web and software development. I am also interested in sharing my knowledge with people.

I have expertise in asp.net and related Microsoft technologies, with JavaScript frameworks and libraries like JQuery, KnockOut.js,and AngularJS.
Yatendrasinh Joddha on FacebookYatendrasinh Joddha on GithubYatendrasinh Joddha on LinkedinYatendrasinh Joddha on TwitterYatendrasinh Joddha on Wordpress