What is one time procedure

Questions by hasanvtu   answers by hasanvtu

Showing Answers 1 - 10 of 10 Answers

Kavitha Govindaswamy

  • Nov 1st, 2006
 

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

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;

Thulasidas

  • Dec 4th, 2006
 

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

javedans

  • Jul 8th, 2009
 

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;

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