码迷,mamicode.com
首页 > 数据库 > 详细

Mysql自定义函数

时间:2017-02-14 18:49:10      阅读:207      评论:0      收藏:0      [点我收藏+]

标签:cti   span   create   style   函数   open   自定义函数   ges   class   

技术分享
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自定义函数

标签:cti   span   create   style   函数   open   自定义函数   ges   class   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!