How do I generate a range of consecutive numbers (one per line) from a MySQL query so that I can insert them into a table?
For example:
nr 1 2 3 4 5
DECLARE i INT DEFAULT 0; WHILE i < 6 DO /* insert into table... */ SET i = i + 1; END WHILE;