How is Exception Handling handled in MySQL?

Answer

Exception handling means changing the usual expected flow of the code. This needs to be done to avoid errors. The exceptions in MySql can be handled using the following syntax:

DECLARE handler_type (Continue | Exit) HANDLER FOR condition_value[,...] sp_statement

Here, whenever an error occurs, the handler type value will decide whether to continue or Exit. Continue will execute the next Sql statement while exit will exit the procedure. Condition_value can take number of levels of categories. set condition is used to define code to be performed if the handler is called.  

All sql dba Questions

Ask your interview questions on sql-dba

Write Your comment or Questions if you want the answers on sql-dba from sql-dba Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---