dregduc63699 2015-01-12 06:03
浏览 48
已采纳

无法在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)

  • 写回答

1条回答 默认 最新

  • dongyi1939 2015-01-12 06:49
    关注

    Try this one:

    DELIMITER $$
    
    CREATE PROCEDURE getUsers(IN id INT)
        BEGIN
        // Query, if there
    END $$
    
    DELIMITER ;
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?