PythonCM 2022-12-02 18:39 采纳率: 0%
浏览 13

mysql存储过程中的if else 结构

mysql> create procedure check_score1(in id int)
-> begin
-> declare score float(4,2);
-> select socre into score from student where student.id=id;
-> if score>85 then
-> select '考出了高分';
-> else
-> select '考的一般';
-> end if;
-> end
-> //
ERROR 1064 (42000): 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 'else
select '考的一般';
end if;
end' at line 7

  • 写回答

1条回答 默认 最新

  • CSDN-Ada助手 CSDN-AI 官方账号 2022-12-02 20:27
    关注
    评论

报告相同问题?

问题事件

  • 创建了问题 12月2日

悬赏问题

  • ¥15 python运行报错 ModuleNotFoundError: No module named 'torch'
  • ¥100 华为手机私有App后台保活
  • ¥15 sqlserver中加密的密码字段查询问题
  • ¥20 有谁能看看我coe文件到底哪儿有问题吗?
  • ¥20 我的这个coe文件到底哪儿出问题了
  • ¥15 matlab使用自定义函数时一直报错输入参数过多
  • ¥15 设计一个温度闭环控制系统
  • ¥100 rtmpose姿态评估
  • ¥15 通联支付网上收银统一下单接口
  • ¥15 angular有偿编写,