Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Common variable in Packages
Hi!
You can place a variable in package specification like
CREATE OR REPLACE PACKAGE blahblah
AS
sharedvariable VARCHAR2(10);
proc1;
proc2;
END;
You can see the value of this variable from any other package, procedure or
function.
If You place a variable in package body like
CREATE OR REPLACE PACKAGE BODY blahblah
IS
sharedvariable1 VARCHAR(100) := 'Initial value';
proc1 ...
proc2 ...
END;
then You will see this variable only from procedures in that package
Gints Plivna
>Hello,
>Can i have a common variable in package which can be shared by all the
>procedures in that packate. If yes, where to delcare the variable and any
>sprecial cluase to decalre?
Received on Sat Jul 01 2000 - 08:12:16 CDT
![]() |
![]() |