复制代码 代码如下:
declare @a int
set @a = 1
while @a<25
begin
INSERT INTO demotable (id,item1,item2) VALUES (@a,"abc","123")
set @a = @a + 1
end
复制代码 代码如下:
CREATE DEFINER=`root`@`localhost` PROCEDURE `NewProcedure`()
BEGIN
DECLARE i INT;
SET i=1;
WHILE i<100 DO
INSERT INTO demotable (id,item1,item2) VALUES (i,"测试试题","0");
SET i = i + 1;
END WHILE;
END;
新闻热点
疑难解答