Examine this query:
Which two methods should you use to prevent prompting for a hire date value when this query is executed? (Choose two.)
Examine this query:
Which two methods should you use to prevent prompting for a hire date value when this query is executed? (Choose two.)
To prevent prompting for a hire date value when the query is executed, you can use two methods: using the DEFINE command before executing the query or storing the query in a script and passing the substitution value to the script when executing it. The DEFINE command allows you to specify a value for the substitution variable beforehand, so the query does not prompt for it. Storing the query in a script and passing the substitution value to the script allows you to provide the value once when executing the script, preventing further prompts.
B. By replacing '&1' with '&&1' in the query, it creates a double-ampersand substitution variable which will remember the value of the variable throughout the session and will not prompt for a value every time it is used. F. By storing the query in a script and passing the substitution value to the script when executing it, you can provide a value for the variable before the query is executed. This prevents the query from prompting for a value when it is executed.
AF are correct. B will promt once, but question asks for no prompting at all C. UNDIFINE is not a thing D/E Verify has nothing to do with prompting
It's confusing, if you replace &1 with &&1 it would still be asking for the value every time you run the query, it doesn't make sense to me... but if you previously used DEFINE to define that variable, it wouldn't. That's why I think AF is more accurate
B cannot be an option because the question says "Prevent prompting of hire date value". && will still prompt it once.
Still cant get why F is the answer, it literally says 'pass a value', doesnt that translate to prompting the user? as for B, && does an implicit DEFINE on first value entered via the prompt, but if it was already defined then it will just use the value that was already defined, I say AB.
looking this up was a bit difficult, but GPT says as I say.
Why is B not correct?..and someone explain how o store a query in a script, i cant get the concept..
vi sql_script.sql select * from employees where employee_id = '&1'; to execute the file -> @sql_script.sql then it will prompt for value -> Enter value for 1:101 here you can enter whatever id you want. These are used to generate reports for debugging.
Why not B?
https://www.oreilly.com/library/view/oracle-sqlplus-the/1565925785/ch04s06.html#:~:text=The%20UNDEFINE%20command%20deletes%20a,it%20is%20no%20longer%20needed. The UNDEFINE command deletes a variable definition. If you have created a variable containing sensitive information, such as a password,...
There is no UNDEFINE keyword