begin
  insert into flightForever select startdate,enddate,cost from flightTemp;
  if sqlcode=0 then
       commit;
  else 
       rollback;
  end if;
end
/老是报错:
ORA-06550: line 11, column 0:
PLS-00103: Encountered the symbol "end-of-file" when expecting one of the following:   ; <an identifier> <a double-quoted delimited-identifier>
The symbol ";" was substituted for "end-of-file" to continue可是if else endif语法没有错啊,到底是啥地方错了呢? 

解决方案 »

  1.   

    begin
      insert into flightForever select startdate,enddate,cost from flightTemp;
      if sqlcode=0 then
           commit;
      else 
           rollback;
      end if;
    end;
    /
      

  2.   

    begin
      insert into flightForever select startdate,enddate,cost from flightTemp;
      if sqlcode=0 then
           commit;
      else 
           rollback;
      end if;
    end;
      

  3.   

    以测试begin
      insert into flightForever select startdate,enddate,cost from flightTemp;
      if sqlcode=0 then
           commit;
      else 
           rollback;
      end if;
    end;--见";"