create or replace function getAddSalaryRatio(p_job varchar2)
return number
as
v_result number(7,2);
begin
if p_job = 'CLERK'
then
v_result := 0.10;
elsif p_job = 'SALESMAN'
then
v_result := 0.12;
elsif p_job = 'MANAGER'
then
v_result := 0.15;
end if;
return v_result;
end;上面是创建一个函数,在PL/SQL Developer开发环境中,输出Function created,
但是我想找出刚创建的这个函数,在PL/SQL Developer开发环境中怎么查找呢?functionsql

解决方案 »

  1.   

    另附上:<<外部块>>
    declare 
    v_deptcount number(2);
    v_deptno number(2) := 80;
    v_deptname varchar2(12);
    begin
    --内部嵌套块
    <<查询员工名称块>>
    begin
    select dname into v_deptname from scott.dept where deptno = v_deptno;
    Dbms_output.put_line('您查询的部门名称为:' || v_deptname);
    end;
    --内部嵌套块
    <<更新员工记录块>>
    declare
    v_loc varchar2(10) := '深圳罗湖';
    begin
    --执行插入操作
    update scott.dept set loc = v_loc where deptno = v_deptno;
    Dbms_output.put_line('在内部嵌套块中成功更新部门资料!');
    end;
    commit;
    exception
    when no_data_found
    then 
    <<插入员工记录块>>
    begin
    insert into scott.dept values (v_deptno,'销售部','深圳');
    Dbms_output.put_line('在异常处理嵌套块中成功更新部门资料!');
    exception
    when others
    then
    Dbms_output.put_line(SQLERRM);
    end;
    commit;
    end;按照嵌套块的格式:<<嵌套块名>>
    为什么在PL/SQL Developer环境中会出错呢?
    希望路过的大神能够帮忙解答~~