2

Hi everyone hope you're doing well I'm new to oracle PL/SQL and I'm trying to write a function using 'ACCESSIBLE BY' clause but I receive errors . this is my function

create or replace function Show_Description 
(i_Course_Number course.course_no%Type) Return Varchar2
  ACCESSIBLE BY(function show_binary)

   AS

     V_Description Varchar2(50);
  Begin
      Select description
      into V_Description
      from course
      Where course_no = i_Course_Number;
   Return V_Description;

  Exception

   When No_Data_Found Then
     Return('Course Is not in the database');
   When Others Then
     Return('Error in running Show_Description Function');

END; 

I want to know if it's even possible to use 'ACCESSIBLE BY' clause with a function.this the error I receive : ORA-00922 :missing or invalid option

4

ACCESSIBLE BY is a 12c feature. Based on your previous questions, you have a 11g database.

  • I checked the version and you're right. We are using the old version . – Pantea Tourang Jun 11 at 7:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.