In function and procedure the parameter pass is "call by value" or "call by reference"?

Questions by ddkdhar   answers by ddkdhar

Showing Answers 1 - 18 of 18 Answers

Nikhil_4_Oracle

  • Mar 5th, 2007
 



HI,


IN : 
is default Param and always Pass By Value, in case of IN Parma Default
value is possible

i.e
Create or replace procedure Cal_Comm
(did in emp.deptno%type Default 20)

  is possible.

OUT , IN OUT : 

   Are by reference , here Default value is not possible.

Tanx

NIKHIL
            

  Was this answer useful?  Yes

deep_paudel

  • Mar 12th, 2007
 

IN params are by default pass by references.
IN OUT & OUT params are by default pass by value.
One can pass IN OUT/OUT by references  using NOCOPY option.
e.g. p_return OUT NOCOPY varchar2 .

Rup

  • Aug 30th, 2007
 

Can anyone please explain the same. The above two answers are contradictory.

  Was this answer useful?  Yes

malik.aman

  • Dec 4th, 2007
 

IN: Call by reference
OUT: call by value, Exception is with the use of NOCOPY, when nocopy is used oracle knows that it should not copy the values back and use the reference to the same memory area

ashwinee2

  • Apr 10th, 2008
 

Take this:

IN parameters are passed by reference, so the value cannot be changed in the procedure and functions.
Out and IN-OUT parameters are passed by value, so the values can be changed inthe procedures and fucnctions.

IN :- actual parameter is passed by reference (a pointer to the value is passed in)


OUT:- actual parameter is passed by value (a copy of the value is passed out) unless NOCOPY is specified


INOUT :- actual parameter is passed by value (a copy of the value is passed in and out) unless NOCOPY is specified

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions