Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Best practice for storing Global variables in package

Oracle_MonkeyJul 4 2018 — edited Jul 5 2018

Hello,

I need to store GLOBAL VARIABLES in a package  whose value I will get from a table.Do i need to create separate procedure in the package to store these values.

What is the best practice ?

Thanks.

package  body test

as

p_global_var_1 number;

p_global_var_2 number;

Procedure p1 as

begin

select

1,

2

into

p_global_var_1,

p_global_var_2

from

dual;

end p1;

Procedure p2 as

begin

dbms_ouput.put_line ( p_global_var_1 ||  p_global_var_2);

end p2;

end test;

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 2 2018
Added on Jul 4 2018
11 comments
1,705 views