![]() Use the DELIMITER // with the DROP PROCEDURE IF EXISTS DELIMITER //ĭROP PROCEDURE IF EXISTS add_python_photo // ![]() SELECT LAST_INSERT_ID() INTO python_photo_id There are two simple solutions SOLUTION #1Ĭhange the DELIMITER after you drop the procedure DROP PROCEDURE IF EXISTS add_python_photo ĬREATE PROCEDURE add_python_photo(IN file_name VARCHAR(20), Your problem is the not the syntax of the stored procedure but the DELIMITER statement. Regarding the DELIMITER suggestion, below is another stored procedure - which executes correctly: 12 DELIMITER //ġ3 DROP PROCEDURE IF EXISTS add_python_parent ġ4 CREATE PROCEDURE add_python_parent( IN python_id INT,ġ8 INSERT INTO python_parent (python_id, mother_id, father_id)ġ9 VALUES (python_id, mother_id, father_id) Įxecution: mysql> source stored_procedures/add-python-parent.sql It seems to fail while processing the 'IN python_id INT' parameter. The list of 'IN' parameters appears to be syntactically correct - yet, that appears to be the source of the error. I'm uncertain as to what syntactic error MySQL is referring to. ![]() Query OK, 0 rows affected, 1 warning (0.00 sec)ĮRROR 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 ' Mysql> source stored_procedures/add-python-photo.sql ![]() I am receiving an error 1064 on the following stored procedure: 12 DELIMITER //ġ3 DROP PROCEDURE IF EXISTS add_python_photo ġ4 CREATE PROCEDURE add_python_photo( IN fname VARCHAR,ģ2 SELECT LAST_INSERT_ID() INTO python_photo_id ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |