Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where can I find the list of SQLException error codes for MySQL?

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?

like image 300
Ivan Avatar asked Oct 17 '11 20:10

Ivan


People also ask

How do I view MySQL errors?

The SHOW COUNT(*) ERRORS statement displays the number of errors. You can also retrieve this number from the error_count variable: SHOW COUNT(*) ERRORS; SELECT @@error_count; SHOW ERRORS and error_count apply only to errors, not warnings or notes.

How do I see full errors in MySQL Workbench?

To cause MySQL Workbench to show error messages, I had to change a preference. From the Workbench menu, click "Edit" -> "Preferences..." Open the "SQL Queries" tab.

How do I show SQL errors?

After you use the CREATE command to create a stored procedure, a message is displayed if the stored procedure has any compilation errors. To see the errors, you use SHOW ERRORS. When you specify SHOW ERRORS with no arguments, SQL*Plus shows compilation errors for the most recently created or altered stored procedure.


1 Answers

They're available in the MySQL documentation.

  • Server error codes
  • Client error codes
like image 196
BalusC Avatar answered Sep 29 '22 00:09

BalusC