Mysql data to generate one million

1. Create a stored procedure which function

CREATE DEFINER=`root`@`%` PROCEDURE `NewProc`()
BEGIN

SET @num = 1;
WHILE
@num < 1000000 DO

You need to insert sql statement
INSERT INTO attendance_card_record (the above mentioned id, user_id, attendance_set_id, user_name, image_name, fastdfs_path, suffix, create_time, devisn_type, system_code, campus_id)
VALUES
(
REPLACE (UUID (), '-', ''),
'1,077,189,277 ',
' 1077189277 ',
' 0b496134937342eca15690134142a36a ',
' cfd29e8056834f8d90f939354d2d3b4e ',
' will Zeng ',
' 1077189277 ',
' 2019-09-16 08:58:58 ',
' 1077189277 ',
'. 4A: BA: 72: the BD: 57 is: B7 ',
' 2019-09-16 08:58:58 '
);

Set @num @num = +1;

END WHILE;

END

 

2. Then call a stored procedure

call  NewProc()

Guess you like

Origin www.cnblogs.com/bt2882/p/11577593.html