Execution methods:
Positional notation:
Positional notation:
Ø Specify
the actual parameters by the same order as the formal parameters are declared.
Named notation:
Ø Named the notation is an actual argument with the formal parameters.
Ø Named the notation allows changing the order in which you pass actual parameter.
Mixed notation:
Ø Mix
of position and named notation is mixed notation. The position must precede the
named notation, reversed is not allowed.
Example:
Explanation:
·
Here,100 is the empno
(First parameter of the procedure),2000 is the amt (second parameter), ‘N’ is
the last parameter).
·
Oracle takes the value of the Formal parameter when the position is an accurate match to the Actual parameters.
Output:
Salary updated
and committed for the Employee 100
Named notation:
Explanation:
·
Here, Parameter name
with the value. we can able to jumbled the parameter what we want.
·
Order is not mandatory.
Another method ,
Explanation:
Mixed
notation:
Below execution shows error:
Invalid
notation:
Output:
Error:
ORA: A positional
parameter association may not follow a named association.
No comments:
Post a Comment