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?
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.
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.
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.
They're available in the MySQL documentation.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With