Oracle Database: Program with PL/SQL — Question 25
Which statement is true about internal and external LOBs?
Answer options
- A. An external LOB can be loaded into an internal LOB variable using the DBMS_LOB package.
- B. A NOEXIST_DIRECTORY exception can be raised when using internal and external LOBs.
- C. Internal and external LOBs can be written using DBMS_LOB.
- D. After an exception transfers program control outside a PL/SQL block, all references to open external LOBs are lost.
- E. When using DBMS_LOB.INSTR for internal and external LOBs, DBMS_LOB.OPEN should be called for each LOB.
Correct answer: D, E
Explanation
Statement D is correct because when an exception occurs, the references to any open external LOBs are no longer valid after control exits the PL/SQL block. Statement E, while seemingly relevant, is incorrect because DBMS_LOB.OPEN does not need to be called for each LOB in all cases; it is only required for specific operations. The other options either misrepresent the behavior of LOBs or provide incorrect information about exceptions.