Mysql自定义函数

delimiter $
drop function if exists f1 $
mysql> create function f1(l1 int,l2 int)
returns int
begin
declare mun int;
set mun = l1 + l2;
return(mun);
end $
mysql> delimiter ;
mysql> select f1(3,4);
代码

原文地址:https://www.cnblogs.com/cloniu/p/6398695.html