Oracle Database Administration I — Question 122
Which two statements are true about substitution variables? (Choose two.)
Answer options
- A. A substitution variable can be used with any clause in a SELECT statement.
- B. A substitution variable used to prompt for a column name must be enclosed in double quotation marks.
- C. A substitution variable used to prompt for a column name must be enclosed in single quotation marks.
- D. A substitution variable prefixed with & always prompts only once for a value in a session.
- E. A substitution variable can be used only in a SELECT statement.
- F. A substitution variable prefixed with && prompts only once for a value in a session unless it is set to undefined in the session.
Correct answer: A, F
Explanation
Option A is correct because substitution variables can indeed be used in various parts of a SELECT statement. Option F is also correct as it explains the behavior of the && prefix, which allows for a single prompt in the session unless the variable is set to undefined. The other options are incorrect based on the rules of substitution variable usage in SQL.