Oracle Database: Advanced PL/SQL — Question 3
Which two are true about Conditional Compilation in PL/SQL using $IF, $ELSE, $END, and $ERROR? (Choose two.)
Answer options
- A. PL/SQL code can be compiled and executed based on different versions of the operating system.
- B. PL/SQL code can be compiled and executed based on different versions of Oracle.
- C. It is newer syntax that works the same way as 'IF , ELSEIF , ELSE, and END IF'.
- D. Conditional compilation is disabled by default.
- E. The PL/SQL compiler can conditionally include selected parts of a program.
Correct answer: B, E
Explanation
Option B is correct because Conditional Compilation allows code to be compiled based on the Oracle version, enabling features specific to that version. Option E is also correct as it describes the functionality of the PL/SQL compiler in selectively including code. The other options are incorrect because they either misrepresent the features of Conditional Compilation or state defaults inaccurately.