SELECT * FROM no_such_table;ERROR 1146 (42S02): Table 'test.no_such_table' doesn't exist
- A numeric error code (
1146). This number is MySQL-specific and is not portable to other database systems.
- A five-character SQLSTATE value (
'42S02'). The values are specified by ANSI SQL and ODBC and are more standardized. Not all MySQL error numbers are mapped to SQLSTATE error codes. The value
'HY000'(general error) is used for unmapped errors.
- A message string that provides a textual description of the error.
- The Error values and the symbols in parentheses correspond to definitions in the
include/mysqld_error.hMySQL source file.
- The SQLSTATE values correspond to definitions in the
include/sql_state.hMySQL source file.
SQLSTATE error codes are displayed only if you use MySQL version 4.1 and up. SQLSTATE codes were added for compatibility with X/Open, ANSI, and ODBC behavior.
- The Message values correspond to the error messages that are listed in the
%srepresent numbers and strings, respectively, that are substituted into the messages when they are displayed.