Mysql自定义函数

Posted 200ML

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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);
代码

 

以上是关于Mysql自定义函数的主要内容,如果未能解决你的问题,请参考以下文章