闷肆procedure jobs(empid scott.emp.job%type,numbs out number)
function depts(deptid scott.emp.deptno%type) return number
end pk2
/
create or replace package body pk2 is
procedure jobs(empid scott.emp.job%type,numbs out number) is
begin
select count(*)
into numbs
from emp
where job = empid
exception
蚂乱轿 when others then
numbs := 0
end
function depts(deptid scott.emp.deptno%type) return number is
陪缺numbs number
begin
select count(*)
into numbs
from emp
where deptno = deptid
return numbs
exception
when others then
return 0
end
end pk2
/
视图洞拦坦的名称 和 存储过程包体名称别一样 换换试试还有 函数不能像这纳桐样调用啊
你这样调用 只能是衡兄用procedure 不能用函数方法 具体你自己调试编译一下吧 编译成功应该就O了。。
create or replace package fs_view_param is
procedure get_value return varchar2
procedure set_value(ps_time in varchar2)
end fs_view_param
create or replace package body fs_view_param is
m_v varchar2(6)
procedure set_value(ps_time in varchar2) is
begin
m_v := ps_time
end
procedure get_value return varchar2 is
begin
return m_v
end
end fs_view_param
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)