begin
 DECLARE  CC NUMBER(10);
 CC:=1; 
 WHILE CC<999 LOOP
  
  insert into studenta values(1,'徐长友',80,38); 
  CC:=CC+1;
  
  END LOOP;
end
/*
 CC:=1;
   *
ERROR 位于第 3 行:
ORA-06550: 第 3 行, 第 4 列:
PLS-00103: 出现符号 "="在需要下列之一时:
constantexception
<an identifier><a double-quoted delimited-identifier>table
LONG_doublerefchartimetimestampintervaldatebinarynational
characternchar
*/
--那里错了呀

解决方案 »

  1.   

    DECLARE  CC NUMBER(10); 移到begin上面去
      

  2.   

    --定义区
    declare--执行区
    beginend
      

  3.   

    循环也写错了
     
    DECLARE  CC NUMBER(10); 
    begin
    CC:=1; 
    LOOP 
      
      insert into studenta values(1,'徐长友',80,38); 
      CC:=CC+1; 
      exit when CC >=999 ;
      END LOOP; 
    end 
      

  4.   


     declare cc number(10);
    *
    ERROR 位于第 1 行:
    ORA-06550: 第 12 行, 第 0 列:
    PLS-00103: 出现符号 "end-of-file"在需要下列之一时:
    ;<an identifier>
    <a double-quoted delimited-identifier>
    符号 ";" 被替换为 "end-of-file" 后继续。
      

  5.   

    declare  
      cc number(10):=1;
    begin 
    --CC:=1; 
      while CC<999 loop   
            insert into studenta values(1,'徐长友',80,38); 
            CC:=CC+1;   
      end loop; 
    end; 
    /
      

  6.   

    end后面少了一个符号啊!
      

  7.   

    初学ORCALE,有些不习惯,,,谢谢大家