Reputation: 176
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 shows error)why??
CREATE PROCEDURE Demo(in v_id int)
BEGIN
select name from student where id=v_id;
END//
delimiter;
Upvotes: 3
Views: 6953
Reputation: 1808
Try
DELIMITER $$
CREATE PROCEDURE Demo(in v_id int)
BEGIN
SELECT name from student where id=v_id;
END $$
DELIMITER ;
Upvotes: 0
Reputation: 5246
Your problem is not the line
DELIMITER //
but the line
delimiter;
You've left out a space; it should be
delimiter ;
Upvotes: 7