GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Oracle  >  Basics
Go To First  |  Previous Question  |  Next Question 
 Basics  |  Question 30 of 49    Print  
What is one time procedure

  
Total Answers and Comments: 4 Last Update: July 08, 2009     Asked by: hasanvtu 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Thulasidas
 

And the primary purpose of one time procedure is for one time initialisation of package variables



Above answer was rated as good by the following members:
saginandkishore, subajay
November 01, 2006 02:26:55   #1  
Kavitha Govindaswamy        

RE: What is one time procedure

Hi

One time only procedure is executed only once when the package is first invoked within the user session. The key word END is not used at the end of the one time only procedure.

Regards

G.Kavitha


 
Is this answer useful? Yes | NoAnswer is useful 2   Answer is not useful 0Overall Rating: +2    
December 04, 2006 07:34:48   #2  
rampratap409 Member Since: September 2006   Contribution: 111    

RE: What is one time procedure

One time procedures is a Simple anonumus block in a package body which will not have an end keyword . end for package will serve the both task. this procedure is executed very first time when first call made to this package.

example:

create package body demo as
function show_num return number is
begin
return num;
end;
begin
num : 50;
end;
end demo;

create or replace package body demo as
function show_num return number is
begin
return num;
end;
begin
num : 50;
end demo;


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
December 04, 2006 21:17:53   #3  
Thulasidas        

RE: What is one time procedure

And the primary purpose of one time procedure is for one time initialisation of package variables


 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    
July 08, 2009 14:22:24   #4  
javedans Member Since: January 2009   Contribution: 8    

RE: What is one time procedure

One time procedure Its actually not a procedure but its called as one time procedure Why because this used to initialize variable calling function or procedure once the scope of package for user session.

This can be defined like this..
Package Body A
a number;


Proc a;

Proc b;

begin----End of one time procedure should be end of package body
a: 10;
End;


 
Is this answer useful? Yes | No


 
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