开发者

Scope of Oracle package level variables

开发者 https://www.devze.com 2022-12-22 10:38 出处:网络
Given the following Oracle (10g) package definition: create or replace PACKAGE \"foo\" AS bar VARCHAR2(32000) := NULL;

Given the following Oracle (10g) package definition:

create or replace PACKAGE "foo"
AS

   bar VARCHAR2(32000) := NULL;

END;

what is the scope of bar? Does each session get its own foo.bar, or is foo.bar global across sessions?

Can you quote me chapter and verse from a开发者_开发技巧 reference document?


The scope is at the session level. See the first sentence under the heading "Added Functionality" in the PL/SQL User's Guide and Reference


This variable can contain different values across multiple sessions. If you want to change this, please use PRAGMA_SERIALLY_REUSABLE.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号