i want to execute a mysql stored procedure from mysql command prompt in phpmyadmin.stored procedure is written in a file sample.sql. contents of sample.sql is:
DELIMITER //
create procedure sampleproc()
begin
declare x int;
set x=1;
while x<=1000 do
insert into dictionary (word,mean) values('a','a mean');
set x=x+1;
end while
end //
call sampleproc();
How can i run this using command line?
Using PHPMYADMIN
To create a stored procedure, you can use the following :
And make sure you set the “Delimiter” field on the SQL tab to //.
Using Command Line