mysql 自定义函数的调用及赋值

发布时间 2023-10-23 17:48:29作者: 单纯的桃子

函数调用:select 函数名(参数);

函数返回值赋值:

set 变量名 = (select 函数名(参数));

select 函数名(参数) into 变量名;

示例:

自定义函数内容

 

select test4(5) into aa; 
set bb = (select test4(10));
select aa,bb;