NAMESPACE column in OBJ$

  • From: "Jason Heinrich" <jheinrichdba@xxxxxxxxx>
  • To: oracle-l <oracle-l@xxxxxxxxxxxxx>
  • Date: Sat, 24 May 2008 21:54:06 -0500

Could someone explain to me what the NAMESPACE column is for in the SYS.OBJ$
table?  I've been hunting around, but almost everything I've found so far
has to do with OO programming, and the few web pages that have come up with
that column don't actually say anything about it: it's just in some sample
code.

Background: The following cursor is in the application I'm working on:

CURSOR g_get_nullable (
    i_table_name     VARCHAR2,
    i_column_name    VARCHAR2
) IS
    SELECT DECODE(count(*), 0, 'Y', 'N') nullable
    from
        sys.ccol$ cc,
        sys.con$ c,
        sys.col$ col,
        sys.obj$ o
    where
        o.owner# = userenv('SCHEMAID')
        and o.name = UPPER(i_table_name)
        and o.namespace = 1
        and col.obj# = o.obj#
        and col.name = UPPER(i_column_name)
        and cc.obj# = o.obj#
        and cc.col# = col.col#
        and c.con#  = cc.con#
        and c.name like 'NN%' ;

I think I can just replace it with a query of USER_TAB_COLUMNS, but I'm not
sure what the o.namespace = 1 does.

-- 
Jason Heinrich

Other related posts: