![]() If it is to exit, exit the begin.end where the declare is located.ĭECLARE CONTINUE HANDLER FOR SQLSTATE '23000' - "This is an exception If it is executed next, it is to execute the next statement of the wrong SQL Suggestion: Add exception handling to the stored procedure.ĭECLARECONTINUE/EXITHANDLER FORSQLSTATE '23000' (error code)Įxecute SQL first, then execute EXIT/CONTINUEįor any error, first execute the SQL statement, which can be a begin.end statement block Īccording to continue or exit, determine whether to continue execution or exit begin.end ![]() ERROR 1062 (23000): Duplicate entry '2' for key 'PRIMARY'Įrror 4-digit error code (5-digit sql statis): error contentįor stored procedures without exception handling, it is very difficult to predict the execution results during execution.
0 Comments
Leave a Reply. |