delimiter //create procedure add(IN a int, IN b int,OUT c int)beginset c=a+b;end;//delimiter ;
2 回答
料青山看我应如是
TA贡献1772条经验 获得超8个赞
1、报错: 查询:CALL ADD(1,2,@total) 错误代码: 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 'ADD(1,2,@total)' at line 1 2、报错原因:ADD 是 mysql的保留关键字 3、解决方法:将存储过程名称ADD修改成p_addCalc (累加器) 4、调用存储过程方法: CALL p_addCalc (1,2,@total); SELECT @total; |
添加回答
举报
0/150
提交
取消
