DELIMITER //
CREATE PROCEDURE callback()
begin
declare num int;
set num = 1;
LOOP_LABLE :
loop
set num = num + 1;
INSERT INTO `employee` VALUES (NULL, concat("员工00",num), concat("emp00",num), '0', '18', '员工', concat("1831432178",num), '3000', '0', '0');
if num >= 20
then leave LOOP_LABLE;
end if;
end loop;
end;
CALL callback();
-- alter table `trace_test` AUTO_INCREMENT=1;

被折叠的 条评论
为什么被折叠?



