create or replace package body 存储过程编译时总报错
create or replace package body PKG_GD_STUDENTINFO is
procedure MP_EL_INFORM is
begin
declare
v_update_sql varchar2(1000) := '';
end;
end MP_EL_INFORM;
end PKG_GD_STUDENTINFO;
=========================================================================
以上代码在PLSQL里面编译后总提示以下错误:
Compilation errors for PACKAGE BODY NEWSTUDENT.PKG_GD_STUDENTINFO
Error: PLS-00103: 出现符号 "END"在需要下列之一时:
begin function package
pragma procedure subtype type use <an identifier>
<a double-quoted delimited-identifier> form current cursor
Line: 16
Text: end;
Error: Hint: Variable 'v_update_sql' is declared but never used in 'MP_EL_INFORM'
Line: 15
Text: v_update_sql varchar2(1000) := '';
------解决方案--------------------PACKAGE少一个BEGIN吧
------解决方案--------------------declare
v_update_sql varchar2(1000) := '';
這兩行放begin上面,再把declare刪掉,procedure里不用使用declare声明变量;
begin 和end之间要写点东西,至少先写个NULL;
------解决方案--------------------declare
v_update_sql 写在begin上面 就行了吧
------解决方案--------------------create or replace package body PKG_GD_STUDENTINFO is
procedure MP_EL_INFORM is
v_update_sql varchar2(1000);
begin
v_update_sql := '';
end;
end MP_EL_INFORM;
end PKG_GD_STUDENTINFO;
这样就行了 应该
------解决方案--------------------
create or replace package body PKG_GD_STUDENTINFO is<