Oracle Database SQL — Question 152
Which is true about the & and && prefixes with substitution variables? (Choose all that apply.)
Answer options
- A. Both & and && can prefix a substitution variable name in queries and DML statements.
- B. An & prefix to an undefined substitution variable, which is referenced twice in the same query, will prompt for a value twice.
- C. & can prefix a substitution variable name only in queries.
- D. An && prefix to an undefined substitution variable, which is referenced multiple times in multiple queries, will prompt for a value once per query.
- E. The && prefix will not prompt for a value even if the substitution variable is not previously defined in the session.
Correct answer: A, B
Explanation
Option A is correct because both prefixes can indeed be used for substitution variables in queries and DML statements. Option B is also correct since the & prefix prompts for a value each time it is encountered in the same query. The other options are incorrect as they misrepresent the functionality of the prefixes with substitution variables.