문제

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()

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top