Hi im trying to insert data in a database for asign an id to each number
table numbers
id | number
1 | 2560
2 | 2561
And this go on for 100 numbers. i found this for PL/sql
BEGIN
FOR v_LoopCounter IN 2560..2660 LOOP
INSERT INTO numbers (number)
VALUES (v_LoopCounter);
END LOOP;
END;
Also tried like
BEGIN
FOR v_LoopCounter IN 2560.2660 LOOP;
INSERT INTO numbers (number);
VALUES (v_LoopCounter);
END LOOP;
END;
How can i do this in Sql using Phpmyadmin, for thats what i can use.
Thanks!
I have tried to run this SQL in PHPMyadmin, but i always got a Syntax Error
There seems to be an error in your SQL query. The MySQL server error output below, if there is any, may also help you in diagnosing the problem
I also have tried now
SELECT * FROM table_name WHERE
BEGIN
FOR v_LoopCounter IN 2560..2660 LOOP
INSERT INTO numbers (number)
VALUES (v_LoopCounter);
END LOOP;
END;