CREATE PROCEDURE insert_many_rows (IN loops INT)
-> BEGIN
-> DECLARE v1 INT;
-> SET v1=loops;
-> WHILE v1 > 0 DO
-> INSERT INTO test_table values(NULL,0,
-> 'qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt',
-> 'qqqqqqqqqqwwwwwwwwwweeeeeeeeeerrrrrrrrrrtttttttttt');
-> SET v1 = v1 - 1;
-> END WHILE;
-> END;
-> //
mysql> delimiter ;
mysql> call insert_many_rows(100000);
阅读(1868) | 评论(0) | 转发(0) |