mysql 存储过程 ,跳出/return出 存储过程

CREATE PROCEDURE SP_Reporting(IN tablename VARCHAR(20))
proc_label:BEGIN
     IF tablename IS NULL THEN
          LEAVE proc_label; -- 跳出存储过程,proc_label是个别名,在begin前起的别名
     END IF;

     #proceed the codeEND;


参考地址:http://stackoverflow.com/questions/6260157/mysql-how-to-quit-exit-from-stored-proceduremysql

相关文章
相关标签/搜索