MYSQL存储过程,报check the manual that corresponds to your MySQL server version for the right syntax to us

写了一个简单的存储过程,竟然报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 '' at line 4;

MYSQL存储过程,报check the manual that corresponds to your MySQL server version for the right syntax to us_第1张图片

通过各种查找原因,竟然是因为在存储过程里,如果有多条sql语句的,需要用begin,end。但如果只有一条语句的,则是不能有begin, end的

MYSQL存储过程,报check the manual that corresponds to your MySQL server version for the right syntax to us_第2张图片

你可能感兴趣的:(数据库,mysql,数据库)