I am a bit confused with mysql create procedure script. My script looks like as follows:
DELIMITER //
DROP PROCEDURE play;
CREATE PROCEDURE play()
BEGIN
insert into hi (name,id)VALUES ('apple','2010');
END
//
It does not insert into table hi.
I am a bit confused with mysql create procedure script. My script looks like as follows:
DELIMITER //
DROP PROCEDURE play;
CREATE PROCEDURE play()
BEGIN
insert into hi (name,id)VALUES ('apple','2010');
END
//
It does not insert into table hi.
Your script does not actually execute the play procedure via call command
You need to add
call play
command
use
CALL play();
and I suggest use
DROP PROCEDURE IF EXISTS play()
instead DROP PROCEDURE play()
IF EXISTS play()? Comments will be useful for others looking for an answer to have a better understanding of your code