一個(gè)簡(jiǎn)單的存儲(chǔ)過(guò)程
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;