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>

解决方案 »

  1.   

    if
    num%3<>0;
    改成
    if num%3<>0 then
      

  2.   

    declare
        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;
      

  3.   

    declare
    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>
      

  4.   

    你的取余在Oracle里也不对,整个代码段错误多多,应该先写个变量存储你的取余结果,然后对取余结果进行判断例如这样declare
    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;