Contents

存储过程

 1DROP PROCEDURE IF EXISTS proc_initData;
 2DELIMITER $
 3CREATE PROCEDURE proc_initData()
 4BEGIN
 5    DECLARE i INT DEFAULT 1;
 6    WHILE i <= 300000
 7        DO
 8
 9            insert into t_user (account,
10                                password,
11                                area_code)
12            values (i, i, '123456');
13            SET i = i + 1;
14        END WHILE;
15END $
16
17CALL proc_initData();
18