开发者

Unable to create this stored procedure in cPanel

When entered as a MySQL query the following code returns this error: "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 'CREATE PROCEDURE getId ( IN p_email VARCHAR(60) , OUT p_id INT 开发者_开发百科) BEGIN S' at line 2"

Is the problem actually in that particular line?

DELIMITER //
DROP PROCEDURE IF EXISTS getId
CREATE PROCEDURE getId
(
  IN p_email VARCHAR(60)
, OUT p_id INT
)
BEGIN
SELECT id
INTO p_id
FROM accounts
WHERE email = p_email;
END //
DELIMITER ;


You are missing a ; at the end of line 2

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜