Reputation: 2449
Can someone help me to create stored procedure?
I am unable to create the stored procedure in my phpmyadmin. MySQL version is 5.6.17. When I try to create the procedure with phpmyadmin interface I am getting error message like below:
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 1
Below is the procedure I am trying to create.
CREATE PROCEDURE getUsers(IN id INT)
When I am trying to create command line below is the error I am getting.
ERROR 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 'CREAT E PROCEDURE getAdmins(IN id INT)
Upvotes: 0
Views: 734
Reputation: 3986
Try this one:
DELIMITER $$
CREATE PROCEDURE getUsers(IN id INT)
BEGIN
// Query, if there
END $$
DELIMITER ;
Upvotes: 1