SQL> create or replace function authorized_emps
2 (
3 p_schema_name in varchar2,
4 p_object_name in varchar2
5 )
6 return varchar2
7 is
8 l_deptno number;
9 l_return_val varchar2(2000);
10 begin
11 if (p_schema_name = USER) then
12 l_return_val := null;
13 else
14 l_return_val := sys_context('DEPT_CTX','DEPTNO_LIST');
15 end if;
16 return l_return_val;
17 end;
18 /
Function created.
SQL>
|