Mysql存储过程

创建:

  delimiter $

  create procedure '过程名称(in param int,out res varchar)'  -- (in:输入参数,param:参数名,int:参数类型;out:输出参数,res:参数名,varchar:类型)

    begin

      sql语句;

    end$

  delimiter ;

调用存储过程:

  call 过程名称(123,@res)$

查询存储过程:

  select name from mysql.proc where db=数据库名称$

删除存储过程:

  drop procedure 过程名称$

原文地址:https://www.cnblogs.com/xuqiang7/p/13742586.html