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.
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.
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. 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.
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,...
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ArslanAltaf
3 months agoyanoolthecool
6 months, 3 weeks agoyanoolthecool
6 months, 3 weeks agowinston
9 months agoLee_jong_suk
7 months, 1 week agoRik92
1 year, 1 month agoJ4vi
1 year, 2 months agotangerine141
1 year, 2 months agoOrxan_H
1 year, 3 months agoninjax_m
1 year, 5 months agodexdinh91
1 year, 6 months ago