i have created a script to insert 100K rows into mysql db.
But the forst line where i declare the variable is giving error. I am new to mysql. Can anyone help me in this?
the script is
i have created a script to insert 100K rows into mysql db.
But the forst line where i declare the variable is giving error. I am new to mysql. Can anyone help me in this?
the script is
What language is this script written in? To my knowledge, mySQL has no scripting language as such.
Hi amitranjansahu,
I have never written a mysql script. I would like to know how you are running this script?
I have a suggestion.
Instead of
DECLARE c INT(10) := 54;
try
DECLARE c INT(10) DEFAULT 54
latter i came to know that no scrpting is there in mysql.So populate the db with 100K rows i had to write a procedure and its working
=========================
DELIMITER $$
DROP PROCEDURE IF EXISTS `AMITDB`.`test_proc3` $$
CREATE PROCEDURE `test_proc3`(IN c INT)
begin
while c < 1000001 do
insert into AMITDB (ID, COMPONENT, COMPONENT_TYPE) values(c,c,'AMIT_ALCATEL');
set c=c+1;
end while;
END $$
DELIMITER ;
cool