求WHILE循环写法!!急!!!加班中!!1
DECLARE I int;
DECLARE J int;
set I=100000;
set J=1;
while I<=120000 do
begin
while J<=10 do
begin
insert into t_favorites values (I,I,I,J,'1','0','100','1','0',now()+0,now()+0,now()+0,now()+0,'1');
if(J=10) then
set J=1;
else
set J=J+1;
end if;
end;
end while;
set I=I + 1;
end;
end while;
end;
报错..请教怎么修改??