一 Oracle 循环插入测试数据 declare maxrecords constant int:=1000; i int :=1; begin for i in 1..maxrecords loop insert into UserInfo(UserID,login,password,firstName,lastName,ISADMINISTRATOR) values(SYS_GUID(),TO_CHAR('9999'+i),'password','fri…
for (var i = 1; i <= 100000; i++) { db.testdata2.insert( { x : i , name: "MACLEAN" , name1:"MACLEAN", name2:"MACLEAN", name3:"MACLEAN"} ) } use testdata2 for(var i=1;i<=10000;i++){db.data.insert({ x:i,n…
实验中经常会遇到需要多条数据的情况就想到了用SQL语句循环生成数据 DROP PROCEDURE if EXISTS test_insert; DELIMITER ;; CREATE PROCEDURE test_insert() BEGIN DECLARE y BIGINT DEFAULT 1; WHILE y<100000 DO INSERT INTO `sshshop`.`product` (`pname`, `market_price`, `shop_price`, `image`, `…