DELIMITER $$
DROP PROCEDURE IF EXISTS bp$$
CREATE PROCEDURE bp(i DATE,j DATE,k varchar(32))
BEGIN
WHILE i<=j DO
insert into t_neowave_blood_pressure values (replace(uuid(),'-',''),i,FLOOR(80+ (RAND() * 100)),FLOOR(70+ (RAND() * 110)),k);
SET i=i+INTERVAL 1 DAY;
END WHILE;
END$$
DELIMITER ;
call bp('2013-02-11','2013-07-11','00101');
call bp('2013-02-11','2013-07-11','00102');
call bp('2013-02-11','2013-07-11','00103');
call bp('2013-02-11','2013-07-11','00201');
call bp('2013-02-11','2013-07-11','00202');
call bp('2013-02-11','2013-07-11','00203');
call bp('2013-02-11','2013-07-11','00301');
call bp('2013-02-11','2013-07-11','00302');
call bp('2013-02-11','2013-07-11','00303');
时间: 2024-09-10 08:57:53