I’m using MySQL 5.5.
To get the exception message on MySQL 5.6 is using GET DIAGNOSTIC function. Is there any similar function in MySQL 5.5 ,.?
The project I’m working is already use MySQL version 5.5.
I’m using MySQL 5.5. To get the exception message on MySQL 5.6 is using
Share
You could try using
SHOW ERRORandSHOW WARNING. To see the last error or warning you could use it as:In order to prevent listing each and every error, you can handle a class of SQL-errors like so:
So to handle an exception, you need to only do:
Links:
http://dev.mysql.com/doc/refman/5.5/en/signal.html
http://dev.mysql.com/doc/refman/5.0/en/declare-handler.html