1z0-071 Exam QuestionsBrowse all questions from this exam

1z0-071 Exam - Question 118


Which is true about the & and && prefixes with substitution variables? (Choose all that apply.)

Show Answer
Correct Answer: AB

Both & and && can prefix a substitution variable name in queries and DML statements. An & prefix to an undefined substitution variable, which is referenced twice in the same query, will prompt for a value twice.

Discussion

4 comments
Sign in to comment
mrcspOptions: DE
Feb 7, 2024

D too select &&a, &&a from dual; select &&a from dual;

Oraclestd24
Mar 30, 2024

select &&a col1, &&a col2 from dual; select &&a col3 from dual; D can't be answer , because it says " will prompt for a value once per query." but that is not the case.

WingLOptions: AB
Jul 8, 2023

A.B correct. reference for B If a single ampersand prefix is used with an undefined variable, the value you enter at the prompt is not stored. Immediately after the value is substituted in the statement the variable is discarded and remains undefined. If the variable is referenced twice, even in the same statement, then you are prompted twice.

lucemqyOptions: AB
Nov 16, 2023

AB is correct https://docs.oracle.com/en/database/oracle/oracle-database/21/sqpug/using-substitution-variables-sqlplus.html#GUID-0BEEC1D7-876B-495C-9327-17037652D3D2

yanoolthecoolOptions: AB
Jun 14, 2024

D is not correct because it will prompt the user once, and only once for all queries, not once for every query.