This content has been marked as final. Show 2 replies
Rahul K wrote:Yes, IN parameters are passed by reference.
IN parameters in oracle subprograms are known to be passed by reference
OUT and IN OUT parameters are passed by value, unless you specify NOCOPY. If you specify NOCOPY, the parameters might be passed by reference. See
Does the compiler create some sort of C related code ? since oracle is written in C .By default, the compiler creates PL/SQL bytecode that is executed by the PL/SQL interpreter engine.
In 11GR2, you can ask the compiler to create C code. That is called "native" compilation. See
Edited by: Stew Ashton on Dec 30, 2012 12:56 PM
Hi,1 person found this helpful
Rahul K wrote:I'm not sure I understand you, but I think you have it right. IN arguments in PL/SQL are passed by reference. A procedure such as p1 gets a pointer to the argument, not a copy of the value.
IN parameters in oracle subprograms are known to be passed by reference. What all C i studied , would have implemented the code like .
formal Parameter of procedure P1 :
(par1 IN NUMBER) --oracle's representation
Now , C representation -->(par1* int)
.i.e. the par1 will be a pointer to the address of the actual parameter passed at invocation.
Actual parameter while calling the procedure P1 :
Now ,C representation
Is this what it really does ?
The PL/SQL manual has a handy chart comparing parameter types
I may be totally wrong but its good to be wrong at times , regarding the below points .If you use Native Compilation , then the compiled code may be C. (It's platform-dependent.)
compiler's Job checking the syntactic & semantic references & creating a compiled code.
Does the compiler create some sort of C related code ? since oracle is written in C .