hi
i have written a sql script for adding 10000 entries in a table in mysql .
drop table test;
/*create table test (name varchar(10), id int primary key,num int,num1 int);
insert into test (name,id,num) values (1,5,5);*/
create table test (id int primary key,name varchar(10));
CREATE PROCEDURE display(no int)
BEGIN
DECLARE counter INT DEFAULT 1;
simple_loop: LOOP
SET counter=counter+1;
insert into test (id,name) values (counter,counter);
IF counter=no THEN
LEAVE simple_loop;
END IF;
END LOOP simple_loop;
call display(10001);
this is the script.
But on executing it is giving this error.
Query OK, 0 rows affected (0.00 sec)
Query OK, 0 rows affected (0.08 sec)
ERROR 1064 (42000): You have an error in your SQL syntax;
check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 11
pls give ur suggestions ...