CREATE TABLE `member` (
`lv_id` int(255) NOT NULL AUTO_INCREMENT,
`uname` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`passwd` varchar(255) DEFAULT NULL,
`sex` int(11) DEFAULT NULL,
PRIMARY KEY (`lv_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20002 DEFAULT CHARSET=utf8;
BEGIN
DECLARE i INT DEFAULT 0;
DECLARE p_name VARCHAR (255);
DECLARE p_email VARCHAR (255);
DECLARE p_sex INT;
WHILE i < 10000 DO
SET p_name = CONCAT('test_', i);
SET p_email = CONCAT('test_', i, '@qq.com');
IF i % 2 = 0 THEN
SET p_sex = 0;
ELSE
SET p_sex = - 1;
END
IF;
INSERT INTO member (uname, email, `passwd`, sex)
VALUES
(
p_name,
p_email,
'e10adc3949ba59abbe56e057f20f883e',
p_sex
);
SET i = i + 1;
END
WHILE;
END