Scope of Oracle package level variables
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.
精彩评论