开发者社区> 问答> 正文

为什么mysql创建函数出错了呢?? 400 报错

为什么mysql创建函数出错了呢?? 400 报错

delimiter $$ create function sum() returns int begin return 10; end	$$

 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'sum() returns int  
          begin
              return 10;
          end' at line 1

再end这个地方哪里出错了啊? 

展开
收起
爱吃鱼的程序员 2020-06-05 12:23:05 393 0
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB

    确定函数能叫sum,不会冲突么

    2020-06-05 12:23:17
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
One Box: 解读事务与分析一体化数据库 HybridDB for MySQL 立即下载
One Box:解读事务与分析一体化数据库HybridDB for MySQL 立即下载
如何支撑HTAP场景-HybridDB for MySQL系统架构和技术演进 立即下载

相关镜像