DBA Data[Home] [Help]

VIEW: SYS.INT$DBA_TAB_COMMENTS

Source

View Text - Preformatted

select u.name, o.name, o.obj#, o.type#,
       decode(o.type#, 0, 'NEXT OBJECT', 1, 'INDEX', 2, 'TABLE', 3, 'CLUSTER',
                      4, 'VIEW', 5, 'SYNONYM', 'UNDEFINED'),
       c.comment$,
       decode(bitand(o.flags, 196608), 65536, 1, 131072, 1, 0),
       to_number(sys_context('USERENV', 'CON_ID'))
from sys."_CURRENT_EDITION_OBJ" o, sys.user$ u, sys.com$ c
where o.owner# = u.user#
  and o.linkname is null
  and (o.type# in (4)                                                /* view */
       or
       (o.type# = 2                                                /* tables */
        AND         /* excluding iot-overflow, nested or mv container tables */
        not exists (select null
                      from sys.tab$ t
                     where t.obj# = o.obj#
                       and (bitand(t.property, 512) = 512 or
                            bitand(t.property, 8192) = 8192 OR
                            bitand(t.property, 67108864) = 67108864))))
  and o.obj# = c.obj#(+)
  and c.col#(+) is null
  and (sys_context('USERENV', 'CON_ID') <= 1 or
       bitand(o.flags, 196608) = 0)
View Text - HTML Formatted

SELECT U.NAME
, O.NAME
, O.OBJ#
, O.TYPE#
, DECODE(O.TYPE#
, 0
, 'NEXT OBJECT'
, 1
, 'INDEX'
, 2
, 'TABLE'
, 3
, 'CLUSTER'
, 4
, 'VIEW'
, 5
, 'SYNONYM'
, 'UNDEFINED')
, C.COMMENT$
, DECODE(BITAND(O.FLAGS
, 196608)
, 65536
, 1
, 131072
, 1
, 0)
, TO_NUMBER(SYS_CONTEXT('USERENV'
, 'CON_ID')) FROM SYS."_CURRENT_EDITION_OBJ" O
, SYS.USER$ U
, SYS.COM$ C WHERE O.OWNER# = U.USER#
AND O.LINKNAME IS NULL
AND (O.TYPE# IN (4) /* VIEW */ OR (O.TYPE# = 2 /* TABLES */
AND /* EXCLUDING IOT-OVERFLOW
, NESTED OR MV CONTAINER TABLES */ NOT EXISTS (SELECT NULL
FROM SYS.TAB$ T
WHERE T.OBJ# = O.OBJ#
AND (BITAND(T.PROPERTY
, 512) = 512 OR BITAND(T.PROPERTY
, 8192) = 8192 OR BITAND(T.PROPERTY
, 67108864) = 67108864))))
AND O.OBJ# = C.OBJ#(+)
AND C.COL#(+) IS NULL
AND (SYS_CONTEXT('USERENV'
, 'CON_ID') <= 1 OR BITAND(O.FLAGS
, 196608) = 0)