Oracle Database: Advanced PL/SQL — Question 5
Which two are true about INDEX-BY tables? (Choose two.)
Answer options
- A. The index can be integer or string.
- B. The index can be integer only.
- C. INDEX-BY table types can be created in PL/SQL blocks only.
- D. INDEX-BY table types can be created both with the CREATE TYPE statement and in PL/SQL blocks.
- E. INDEX-BY table types can be created with the CREATE TYPE statement.
Correct answer: A, C
Explanation
Option A is correct because INDEX-BY tables can indeed have either integer or string indexes. Option C is also correct since INDEX-BY table types can only be created in PL/SQL blocks, which makes the other options incorrect. Options B, D, and E are wrong as they either misstate the index types allowed or the ways to create INDEX-BY tables.