mysql存储过程中begin和end之间很简单的语句都报错,什么原因?
mysql> create procedure p_file_t()
-> begin
-> declare a int
-> set a=1;
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 'int
set a=1' at line 3
mysql> while a<3 do
-> insert into drbd_t(hash,path) values(“abcd123456”, “/192.168.250.100/file”);
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 'while a<3 do
insert into drbd_t(hash,path) values(“abcd123456”, “/192.168.' at line 1
mysql> set a=a+1;
ERROR 1193 (HY000): Unknown system variable 'a'
mysql> end while;
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 while' at line 1