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
精彩评论