Oracle Database SQL — Question 90
Which two statements are true about substitution variables?
Answer options
- A. A substitution variable can be used only 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 can be used with any clause in a SELECT statement.
- D. A substation variable prefixed with && prompts only once for a value in a session unless it is set to undefined in the session.
- E. A substitution variable prefixed with & always prompts only once for a value in a session.
- F. A substitution variable used to prompt for a column name must be enclosed in single quotation marks.
Correct answer: C, D
Explanation
The correct answers are C and D. Statement C is true because substitution variables can indeed be used in any clause of a SELECT statement. Statement D is correct as the && prefix ensures that the prompt occurs only once per session, unless undefined. Statements A, B, E, and F are incorrect because they misrepresent the usage and requirements of substitution variables.