declare
num number(2);
begin
num:=0;
loop
num:=num+1;
if
num%3<>0;
dbms_output.put_line(num);
exit when num>13;
end if;
end loop;
end;ORA-06550: 第 8 行, 第 5 列:
PLS-00103: 出现符号 "3"在需要下列之一时:
( type <an identifier>
<a double-quoted delimited-identifier>
num number(2);
begin
num:=0;
loop
num:=num+1;
if
num%3<>0;
dbms_output.put_line(num);
exit when num>13;
end if;
end loop;
end;ORA-06550: 第 8 行, 第 5 列:
PLS-00103: 出现符号 "3"在需要下列之一时:
( type <an identifier>
<a double-quoted delimited-identifier>
num%3<>0;
改成
if num%3<>0 then
num number(2);
begin
num:=0;
loop
if num/3<>0 then
dbms_output.put_line(num);
end if;
num :=num+1;
exit when num>13;
end loop;
end;
num number;
begin
num:=0;
loop
num:=num+1;
if num%3<>0 then
dbms_output.put_line(num);
exit when num>13;
end if;
end loop;
end;ORA-06550: 第 7 行, 第 8 列:
PLS-00103: 出现符号 "3"在需要下列之一时:
( type <an identifier>
<a double-quoted delimited-identifier>
num number(2);
begin
num:=0;
tempnum:=0;
loop
num:=num+1;
select mod(num,3) into tempnumfrom dual;
if tempnum!=0 then
dbms_output.put_line(num);
exit when num>13;
end if;
end loop;
end;