问题
java.sql.SQLException
offers an int getErrorCode()
function so the program can know what in particular has happened to cause the exception. Any chance to get a list of these codes for MySQL?
回答1:
They're available in the MySQL documentation.
- Server error codes
- Client error codes
来源:https://stackoverflow.com/questions/7799086/where-can-i-find-the-list-of-sqlexception-error-codes-for-mysql