一个简单的存储过程
create procedure test2()
begin
declare i decimal (10) default 0 ;
dd:loop
INSERT INTO `shopnc_admin_log` ( `content`, `createtime`, `admin_name`, `admin_id`, `ip`, `url`) VALUES ( '登录', '1511935482', 'niubi', '1', '192.168.1.131', 'login&login');
commit;
set i = i+1;
if i= 1000000000 then leave dd;
end if;
end loop dd ;
end;
delimiter ;
call test2;
网友评论