Anto S
Anto S

Reputation: 2449

Unable to create procedures in phpmyadmin

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

Answers (1)

prava
prava

Reputation: 3986

Try this one:

DELIMITER $$

CREATE PROCEDURE getUsers(IN id INT)
    BEGIN
    // Query, if there
END $$

DELIMITER ;

Upvotes: 1

Related Questions