1Z0-149 practice question 3 of 15
Which two PL/SQL elements can be deprecated using the DEPRECATE pragma? (Choose two.)
Full set: 65 questionsThe PRAGMA DEPRECATE is a compiler directive that issues a warning when code referencing a deprecated element is compiled. According to Oracle's documentation, this pragma can be applied to a standalone subprogram, a package specification, an object type specification, or specific elements within them. Therefore, an entire PACKAGE can be deprecated. The pragma can also be applied to a CONSTANT declaration within a package. While the option "VARIABLES" is broad, a constant is a form of named data object, making this the only other plausible choice among the options provided, as the other elements listed cannot be deprecated.
C. Anonymous blocks are not named, stored program units and cannot be referenced from other code; thus, deprecation is not applicable.
D. The DEPRECATE pragma is not applicable to a trigger's declaration or its body. Triggers are managed differently.
E. Database links are schema objects for remote database access, not PL/SQL elements to which a compiler pragma can be applied.
- Oracle Database, PL/SQL Language Reference, 19c, "DEPRECATE Pragma". This section explicitly lists the syntax and valid locations for the pragma, which include packagedeclaration and constantdeclarationinpackage.
- Oracle Database, PL/SQL Language Reference, 12c Release 2 (12.2), "DEPRECATE Pragma". The documentation confirms that the pragma applies to packages and constants within packages, but not to general variables, triggers, or database links.
Keep practicing
Take the free 1Z0-149 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 1Z0-149 practice questions
- Question 5Which two statements are true about using the OR REPLACE clause when creating named subpr…
- Question 6Which three are true about functions and procedures? (Choose three.)
- Question 8Which two are true about the PLSQL_CODE_TYPE parameter? (Choose two.)
- Question 9Which three SQL statements, embedded in PL/SQL, typically benefit from using variables de…
- Question 11SERVEROUTPUT is enabled. Which code block will display the values from 1 to 10 in descend…
- Question 15SERVEROUTPUT is enabled. Which is the correct method to use a PACKAGED CONSTANT in SELECT…
