-- 创建存储过程 delimiter $$ create procedure proc02() begin declare i int default 0; while i<10 do INSERT INTO demo.user ( name, age, salary, remark, work_time) VALUES ( '小红', 12, 1000, '打杂', '2011-05-01 12:00:00'); set i = i + 1; end while; end $$ dilimiter ; -- 删除存储过程 drop procedure proc02; -- 调用 call proc02();