AI写作智能体 自主规划任务,支持联网查询和网页读取,多模态高效创作各类分析报告、商业计划、营销方案、教学内容等。 广告
**1.选择数据库** `use 数据库名;` **2.查询功能是否开启** ``` show variables like '%fun%'; 变量名称 log_bin_trust_function_creators ``` **3.开启功能** ``` set global log_bin_trust_function_creators=1; ``` **4创建函数** ``` delimiter $$; create function fun(a int,b int) returns int begin return a+b; end $$; ``` **查看函数创建语句** ``` show create function 函数名称; ``` **查看库下所有函数列表** ``` select `name` from mysql.proc where db = 'STSS' and `type` = 'FUNCTION'   #STSS为库的库名 ``` **删除函数** ``` drop function if exists 函数名称; ```