When creating stored procedures and functions, which construct allows you to transfer values to and from the calling environment?

When creating stored procedures and functions, which construct allows you to transfer values to and from the calling environment?

When creating stored procedures and functions, which construct allows you to transfer values to and from the calling environment?

A.
local variables

B.
arguments

C.
Boolean variables

D.
Substitution variables

Explanation:
Arguments declared in the parameter list of the subprogram are called formal parameters. The MODE determines whether the values can be transferred to the calling environment OUT & IN OUT or from the calling Environment IN & IN OUT.
Incorrect Answers
A, C & D These variables can’t be used to transfer values to & from the calling environment.



Leave a Reply 2

Your email address will not be published. Required fields are marked *


Leo Yu

Leo Yu

B) is incorrect, stored function cannot have “out” or “in out”, only the package procedure can have “out” or “in out”

Leo Yu

Leo Yu

D) is correct:

SQL> define my_variable = ‘my variable value’
suppose there is one procedure my_procedure(my_out_var OUT VARCHAR2);
SQL> execute my_procedure(&my_variable); — pass the substitution variable value

SQL> print my_variable

Actually host varibale can “from” and “to” as well
var my_recipients varchar2(512);
–suppose there is subprogram p_sendemail(recipients OUT VARCHAR2)
EXEC p_sendemail(:my_recipients);
print my_recipients;