GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  PL/SQL
Go To First  |  Previous Question  |  Next Question 
 PL/SQL  |  Question 158 of 241    Print  
In function and procedure the parameter pass is "call by value" or "call by reference"?

  
Total Answers and Comments: 6 Last Update: May 03, 2008     Asked by: ddkdhar 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: deep_paudel
 
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 .

Above answer was rated as good by the following members:
binurajnair, ratna82, manish.baehal, vanishavadlya
March 05, 2007 07:02:24   #1  
Nikhil_4_Oracle        

RE: In function and procedure the parameter pass is "c...


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

 
Is this answer useful? Yes | NoAnswer is useful 0   Answer is not useful 2Overall Rating: -2    
March 12, 2007 11:01:46   #2  
deep_paudel Member Since: March 2007   Contribution: 2    

RE: In function and procedure the parameter pass is "c...
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 .

 
Is this answer useful? Yes | NoAnswer is useful 4   Answer is not useful 0Overall Rating: +4    
August 30, 2007 07:43:02   #3  
Rup        

RE: In function and procedure the parameter pass is "c...
Can anyone please explain the same. The above two answers are contradictory.
 
Is this answer useful? Yes | No
December 04, 2007 14:52:38   #4  
malik.aman Member Since: December 2007   Contribution: 4    

RE: In function and procedure the parameter pass is "call by value" or "call by reference"?
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

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
April 10, 2008 23:15:29   #5  
ashwinee2 Member Since: April 2008   Contribution: 3    

RE: In function and procedure the parameter pass is "call by value" or "call by reference"?
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.

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
May 03, 2008 06:24:01   #6  
krishnaindia2007 Member Since: September 2007   Contribution: 854    

RE: In function and procedure the parameter pass is "call by value" or "call by reference"?
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


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape