Bookmark and Share
an example of loop insert in a MySQL procedure
(Publish Date: 2009-11-13 4:13pm, Total Visits: 10975, Today: 6, This Week: 13, This Month: 72)

delimiter //
CREATE PROCEDURE insert_temp()
    BEGIN
    DECLARE v1 INT;
    SET v1 = 2707242;
    WHILE v1 < 2721615 DO
    insert into temp_02 values (v1);
    SET v1 = v1 + 1;
    END WHILE;
    END;
//
delimiter ;