Wednesday 6 June 2018

"Accessible by" clause


  1. "Accessible by" clause is used to declare a particular unit may be referenced only by given list of units.
  2. Anonymous block cannot be listed under "Accessible by" Clause, hence the units declared as "Accessible by" cannot be called dynamically.
  3. "Accessible by" declared units cannot be invoked from outside of database


CREATE OR replace PROCEDURE proc_for_sal_increment ( pin_empno NUMBER,
                                                    pin_pct    NUMBER ) 

accessible BY (update_sal_wrapper)
AS
BEGIN
  UPDATE emp
  SET    sal = ( sal ) + ( sal * pin_pct / 100 )
  WHERE  empno = pin_empno;
  
  COMMIT;
EXCEPTION
WHEN OTHERS THEN
  dbms_output.put_line('Unable to Update sal : '
  || SQLCODE);
END;




BEGIN
    Proc_for_sal_increment(7698, 10);
END;
/


exec proc_for_sal_increment(7698, 10); 

CREATE OR replace PROCEDURE Update_sal_wrapper
AS
BEGIN
    Proc_for_sal_increment(7698, 10);
END;
/


exec update_sal_wrapper; 

8 comments:

  1. Your article is very well written and I liked your article very much.
    Republic Day Status

    ReplyDelete
  2. Such A Nice Article. I loved it.
    Also, I created one website in which i publish some articles related to Sofas. So, Make sure that you will check it out. Click Hereto checkout my website here.

    ReplyDelete
  3. How to Stream Christmas Zone Holiday Movies on Roku


    Add Christmas Zone on Roku to binge FREE Christmas movies in December 2021. Learn “How to Stream Christmas Zone Holiday Movies on Roku TV?”

    ReplyDelete
  4. How to Activate Roku Device on Different Streaming Channels

    How do you activate Roku device on Different Streaming Channels? This post will guide you through the process to activate Roku code on various channels.

    ReplyDelete
  5. Good post i realy like it. But i also have some Good information about (Tech and cars so get it now)

    ReplyDelete

About Me

I am Siva Jeevan.LK [LEARN | CODE | TRAIN | SHARE] Passionate to answer oracle SQL & PLSQL related questions. In my day to day job, I work with technologies including Oracle, Java, Python, MongoDB, talend and UNIX. I am passionate about "DATA", “SQL” , coding & training. In my spare time, I teach database technologies , ETL etc. I am very glad that you are reading my Profile, and I value your time as well as mine. Looking forward to see you in my videos at Siva Academy Passionate to answer oracle SQL & PLSQL related questions. You can contact me via My youtube channel (Siva Academy) or drop an email at siva.k.academy@gmail.com Happy to Learn & Help :-)

Total Pageviews