2 回答

TA貢獻(xiàn)1804條經(jīng)驗(yàn) 獲得超7個(gè)贊
你放在sql文件中,oracle會(huì)認(rèn)為所有的腳本都是一個(gè)腳本塊,除非碰到執(zhí)行符號(hào) /
所以,修改為以下腳本后將可以執(zhí)行。
create or replace package pkg_sfdc_registration as
emp_id number(10);
procedure hire_employee(e_id out number);
end pkg_sfdc_registration;
/ --- 這里加個(gè)符號(hào) /
create or replace package body pkg_sfdc_registration as
procedure hire_employee(e_id out number) is
begin
select 1 into e_id from dual;
end hire_employee;
end pkg_sfdc_registration;
/ --- 這里加個(gè)符號(hào) /

TA貢獻(xiàn)1780條經(jīng)驗(yàn) 獲得超1個(gè)贊
改成這樣:
create or replace package pkg_sfdc_registration as
emp_id number(10);
procedure hire_employee(e_id out number);
end pkg_sfdc_registration;
/ ---注意這里的/ 要頂格寫
create or replace package body pkg_sfdc_registration as
procedure hire_employee(e_id out number) is
begin
select 1 into e_id from dual;
end hire_employee;
end pkg_sfdc_registration;
/ ---注意這里的/ 要頂格寫
添加回答
舉報(bào)