1z0-082 Exam QuestionsBrowse all questions from this exam

1z0-082 Exam - Question 11


Which two statements are true about the SET VERIFY ON command? (Choose two.)

Show Answer
Correct Answer: ACDE

The SET VERIFY ON command can be used in both SQL Developer and SQL*Plus. It ensures that when substitution variables prefixed with && are used in a SQL statement, their values are displayed in the output. This helps in verifying the values that are being substituted in the SQL statements.

Discussion

14 comments
Sign in to comment
danitoOptions: CD
Jun 7, 2020

C D correct anwers

elbelgounetos
Mar 5, 2021

If guess D is a trap. If you use DEFINE and you're not using the variable, it'll never be displayed with SET VERIFY ON. Example : set verify on DEFINE dummy_char = 'X' SELECT * FROM dual

antonica
Mar 18, 2024

I agree

yukclam9Options: CE
Apr 13, 2021

C,E. D is not correct because 'define' as a individual command will not trigger the prompt. Only when defined variable is used with & or && the verify on thing will take effect.

Franky_TOptions: CE
Apr 12, 2022

The SET VERIFY ON command will enable the display of any substitution variable used in our last executed SQL statement. When you use the DEFINE clause to create a variable, and the variable is not used in the next SQL statement then that variable will not be "shown" by the SET VERIFY command. Oh, and the command is available in all apps that allow the execution of SQL language against your database.

NowOrNeverOptions: CD
Jul 17, 2020

why not E? SET VERIFY ON UNDEFINE dummy_number; SELECT employee_id, job_id FROM employees where EMPLOYEE_ID = &&dummy_number; -- working, he just asks for an input (like 206) i agree with C, but unsure between D and E

ama
Jul 22, 2020

E is wrong… look at below example, the variable was disaplyed even without using set verify on! SQL> SELECT owner , TABLE_NAME FROM DBA_TABLES where table_name = '&&dummy_number'; Geben Sie einen Wert fur dummy_number ein: DUAL alt 1: SELECT owner , TABLE_NAME FROM DBA_TABLES where table_name = '&&dummy_number' neu 1: SELECT owner , TABLE_NAME FROM DBA_TABLES where table_name = 'DUAL' OWNER -------------------------------------------------------------------------------- TABLE_NAME -------------------------------------------------------------------------------- SYS DUAL

adoptc94
Sep 2, 2020

that's because SET VERIFY ON is the default. If you don't specify SET VERIFY OFF it will use SET VERIFY ON

you1234Options: CE
Jul 29, 2020

C & E is correct

ama
Aug 4, 2020

i agree, E is working: SQL> set verify off SQL> select &&var from dual; Geben Sie einen Wert fur var ein: sysdate SYSDATE -------- 04.08.20 SQL> set verify on SQL> select &&var from dual; alt 1: select &&var from dual neu 1: select sysdate from dual SYSDATE -------- 04.08.20

SimoneFOptions: CD
Nov 24, 2020

This is impossible, I just tested the behaviour to be sure and, unsurprisingly, I confirmed that C-D-E seems to be true, thus invalidating A:

SimoneF
Nov 24, 2020

C: It works on SqlDevelope 3.22, so it's not even a new functionality.

SimoneF
Nov 24, 2020

E - It works on && prefixed variables: SQL> set verify off SQL> select employee_id from hr.employees where employee_id =&&emp; Immettere un valore per emp: 200 EMPLOYEE_ID ----------- 200 SQL> undefine emp SQL> set verify on SQL> select employee_id from hr.employees where employee_id =&&emp; Immettere un valore per emp: 200 vecchio 1: select employee_id from hr.employees where employee_id =&&emp nuovo 1: select employee_id from hr.employees where employee_id =200 EMPLOYEE_ID ----------- 200 So, either there are 3 answers instead of (and different from) the 2 suggested, or I'm seriously missing something here.

Guhborges
Oct 30, 2021

Simone, you are missing something here! SET VERIFY does not display values for variables created by the DEFINE command, it shows the corresponding values of the variables we are currently using. If you don't use the create by define variable, you won't be able to see the value of DEFINE.

SimoneF
Nov 24, 2020

D - It works for variables created via DEFINE: SQL> set verify off SQL> define emp = 200; SQL> select employee_id from hr.employees where employee_id = &emp; EMPLOYEE_ID ----------- 200 SQL> set verify on SQL> select employee_id from hr.employees where employee_id = &emp; vecchio 1: select employee_id from hr.employees where employee_id = &emp nuovo 1: select employee_id from hr.employees where employee_id = 200 EMPLOYEE_ID ----------- 200

ChansiOptions: CD
Aug 6, 2020

Did u check if it works on sql developer? It doesn’t work on toad. I tested

adoptc94
Sep 2, 2020

If works in SQL Developer, there are also some YouTube Tutorials that show the command using SQL Developer.

esarreguiOptions: CD
Nov 11, 2020

Answer: C + ¿D or E? SQL> set verify on SQL> select &&x from dual; Enter value for x: dummy old 1: select &&x from dual new 1: select dummy from dual D - X SQL> set verify on SQL> define y='dummy'; SQL> select &y from dual; old 1: select &y from dual new 1: select dummy from dual D - X

ryuahOptions: CE
Jan 9, 2022

C,E is correct

jonsnoow
Jan 8, 2023

C, D, E

ivanadjOptions: CD
Mar 11, 2023

I think C,D is correct.

J4viOptions: CE
Apr 16, 2023

I think C D E, but you can use DEFINE without & or && and VERIFY ON won't work, so C E seems to be the most correct then

RaNik69Options: CE
Apr 21, 2023

both tested

AbdullejrOptions: CD
Jun 7, 2024

The correct answer is C and D.