Which two statements are true about anonymous blocks and named subprograms?

Which two statements are true about anonymous blocks and named subprograms?
(Choose two)
A. Subprograms are by default executed with definer’s rights.
B. The declare section is optional for both anonymous blocks and subprograms.
C. Both anonymous blocks and subprograms execute by default with invoker’s rights.
D. The declare section is mandatory for anonymous blocks and optional for subprograms.

Download Printable PDF. VALID exam to help you PASS.

One thought on “Which two statements are true about anonymous blocks and named subprograms?

  1. In my opinion AB are correct

    https://docs.oracle.com/database/121/DBSEG/dr_ir.htm#DBSEG659

    “By default, all procedures are considered definer’s rights. You can designate a procedure to be an invoker’s rights procedure by using the AUTHID CURRENT_USER clause when you create or modify it, or you can use the AUTHID DEFINER clause to make it a definer’s rights procedure.”

    Following anonymous block doesn’t contain declare section and executes successfully:

    set serveroutput on;
    begin
    dbms_output.put_line(‘Success without DECLARE’);
    end;
    /

    Success without DECLARE

    PL/SQL procedure successfully completed.

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.