syntax error: 'delimiter ' is not valid input here

后端 未结 2 1221
隐瞒了意图╮
隐瞒了意图╮ 2021-01-21 08:54

I have an error in my stored procedure using (mysql 5.6). and I am using Workbench 6.3 CE. My code is as below

DELIMITER //            (this line sh         


        
相关标签:
2条回答
  • 2021-01-21 09:16

    Your problem is not the line

    DELIMITER //
    

    but the line

    delimiter;
    

    You've left out a space; it should be

    delimiter ;
    
    0 讨论(0)
  • 2021-01-21 09:29

    Try

    DELIMITER $$
    CREATE PROCEDURE Demo(in v_id int)
    BEGIN
    SELECT name from student where id=v_id;
    END $$
    DELIMITER ;
    
    0 讨论(0)
提交回复
热议问题