Connor and Chris will both be at AI World from October 12 to October 17 , the premier Oracle conference of 2025. If you're in Vegas, please come say Hi or pop into our sessions
Thanks for the question, Rajeshwaran.
Asked: April 19, 2017 - 2:18 pm UTC
Last updated: April 19, 2017 - 4:15 pm UTC
Version: 12.2.0.1
Viewed 1000+ times
demo@ORA12C> create or replace package mypkg 2 as 3 function f return number accessible by (p1); 4 procedure p2; 5 end; 6 / Package created. demo@ORA12C> create or replace package body mypkg 2 as 3 function f return number 4 accessible by (p1) 5 as 6 begin 7 return 55; 8 end ; 9 10 procedure p2 as 11 begin 12 dbms_output.put_line('Result = '||mypkg.f); 13 end; 14 end; 15 / Package body created. demo@ORA12C> exec dbms_output.put_line( mypkg.f ); BEGIN dbms_output.put_line( mypkg.f ); END; * ERROR at line 1: ORA-06550: line 1, column 35: PLS-00904: insufficient privilege to access object F demo@ORA12C> exec mypkg.p2 ; Result = 55 PL/SQL procedure successfully completed.
Check out more PL/SQL tutorials on our LiveSQL tool.
PL/SQL reference manual from the Oracle documentation library