Exam 1z0-071 All QuestionsBrowse all questions from this exam
Question 118

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

    Correct Answer: A, B

    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
mrcspOptions: DE

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

Oraclestd24

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.

yanoolthecoolOptions: AB

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

lucemqyOptions: AB

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

WingLOptions: AB

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.