有mysql基础,但是第一次写存储过程
参看了网上例程,
直接拷贝进test_proc.sql文件
内容如下
create procedure pr_add
(
a int,
b int
)
begin
declare c int;
end;
然后在linux mysql命令行里面source test_proc.sql 就报错。然后将文件代码修改为
create procedure pr_add
(
a int,
b int
)
begin
end;
就没有报错。只要begin和end之间有任何语句都报错。
参看了网上例程,
直接拷贝进test_proc.sql文件
内容如下
create procedure pr_add
(
a int,
b int
)
begin
declare c int;
end;
然后在linux mysql命令行里面source test_proc.sql 就报错。然后将文件代码修改为
create procedure pr_add
(
a int,
b int
)
begin
end;
就没有报错。只要begin和end之间有任何语句都报错。
解决方案 »
- 存储过程中,运行出现Column count doesn't match value count at row 1问题。麻烦大大帮忙解决
- MySQL如何按照日期字段查询?
- 新手求教EXTRACTVALUE
- MySql用PhpMyAdmin执行SQL语句时报错,我要返回去修改SQL语,却发现被清空了,怎么办?
- 如何修改设置才能导出理想的日期格式??
- 用root用户安装mysql,其他用户无法连接数据库(但是root用户可以登陆),报错信息如下
- 这是怎么了??
- mysql查询求助~
- MySQL 汇出上限要在哪里修改?
- mysql 删除多个图片路径中的 某一个路径?
- mysql 里的 事件 关闭了,怎么回事
- 对调字段的值
create procedure pr_add
(
a int,
b int
)
begin
declare c int;
end$$
delimiter ;
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 'end' at line 1