PLS-00103:遇到符号“AS”

时间:2015-01-06 09:47:38

标签: oracle sqlplus

收到错误

Warning: Procedure created with compilation errors.
SQL> show errors;
Errors for PROCEDURE CREATEBANKACCOUNT:

LINE/COL ERROR
-------- -----------------------------------------------
3/1      PLS-00103: Encountered the symbol "AS"


create or replace procedure 

CreateBankAccount(e1 varchar,e2 varchar,e3 varchar,e4 varchar,e5 varchar,e6 varchar);

as

begin

insert into accountDetails values(e1,e2,e3);

insert into personalDetails values(e4,e5,e6,e1);

end;

/

2 个答案:

答案 0 :(得分:3)

在参数列表的结束;之后,您不应该有分号)

create or replace procedure CreateBankAccount(
  e1 varchar,
  e2 varchar,
  e3 varchar,
  e4 varchar,
  e5 varchar,
  e6 varchar)  /* No ; here! */
as
begin
  insert into accountDetails  values(e1,e2,e3   );
  insert into personalDetails values(e4,e5,e6,e1);
end;
/

答案 1 :(得分:0)

在第一个括号后删除分号:

create or replace procedure CreateBankAccount(e1 varchar,e2 varchar,e3 varchar,e4 varchar,e5 varchar,e6 varchar)
as
  begin
    insert into accountDetails values(e1,e2,e3);
    insert into personalDetails values(e4,e5,e6,e1);
end;
/