创建存储过程:
mysql> delimiter //
mysql> create procedure delete_yy
-> begin
-> select * from student;
-> 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 'begin
解决:
存储过程名后加上括号即可
mysql> create procedure delete_yy() begin select * from student; end//
Query OK, 0 rows affected (0.01 sec)
不过看其他博客,包括在navicat上,都不会因为少括号报错,路过的大佬如果知道评论一声==