[英]Procedure giving error in mysql
I have tried the following code with and without a delimiter in phpmyadmin. 我在phpmyadmin中使用和不使用定界符尝试了以下代码。 It seems to reject the delimiter when I have present.
我出席时似乎拒绝了分隔符。
I am using 1 and 1 hosting and the MySQL
version is 5.0
我正在使用1和1托管,而
MySQL
版本是5.0
The error code I specifically get is #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 3
我专门得到的错误代码是
#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 3
- 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 3
CREATE PROCEDURE add_person_type_procedure(Person_Type_Value_Description VARCHAR(150) , Create_Date DATETIME , Modify_Date DATETIME , Archive CHAR(1))
BEGIN
DECLARE ID VARCHAR(36);
SET ID = (SELECT UUID());
END;
http://dev.mysql.com/doc/refman/5.1/en/stored-programs-defining.html http://dev.mysql.com/doc/refman/5.1/en/stored-programs-defining.html
I think you need "set @ID=..." 我认为您需要“设置@ID = ...”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.