我写了一个简单的存储过程,但是不好使,好像是版本的问题
create procedure p1()
begin
declare a int;
declare b int;
set a=5;
set b=6;
insert into t values(a);
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 'declare b int' at line 1
(耗费 0 ms)错误代码: 1193
Unknown system variable 'a'
(耗费 0 ms)错误代码: 1193
Unknown system variable 'b'
(耗费 0 ms)错误代码: 1146
Table 'renwenzhi.t' doesn't exist
(耗费 0 ms)错误代码: 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 'end' at line 1
(耗费 0 ms)