SYS. All_constraints is defined as follows:
CREATE OR REPLACE VIEW all_constraints (owner, Constraint_name, Constraint_type, TABLE_NAME, search_condition, R_owner, R _constraint_name, Delete_rule, status, Deferrable, deferred, validated, generated, bad, rely, Last_change, Index_owner, I Ndex_name, invalid, view_related) Asselect ou.name, Oc.name, Decode (c.type#, 1, ' C ', 2, ' P ', 3, ' U ', 4, ' R ', 5, ' V ', 6, ' O ', 7, ' C ', 8, ' H ', 9, ' F ', ' F ', ' F ', ' f ', '? ', O.name, C.condition, ru.na Me, Rc.name, Decode (c.type#, 4, Decode (c.refact, 1, ' CASCADE ', 2, ' SET NULL ', ' NO ACTION '), NULL), Decode (c.type#, 5, ' enabled ', Decode (c.enabled, NULL, ' DISABLED ', ' ENABLED '), decode (bi Tand (C.defer, 1), 1, ' deferrable ', ' not deferrable '), Decode (Bitand (C.defer, 2), 2, ' DEFERRED ', ' IMMEDIATE '), Decode (Bitand (C.defer, 4), 4, ' VALIDATED ', ' not VALIDATED '), Decode (Bitand (C.defer, 8), 8, ' GENERATED NAME ', ' USER N AME '), Decode (Bitand (c.defer,16), +, ' bad ', null), Decode (Bitand (c.defer,32), +, ' RELY ', null), C.mtime, Decode (c.type#, 2, U I.name, 3, ui.name, NULL), Decode (c.type#, 2, Oi.name, 3, oi.name, NULL), Decode (Bitand (C.defer, 256), 256, Decode (c.type#, 4, Case when (Bitand (c.defer,) = or O.status in (3, 5) or Ro.status in (3, 5) and then ' INVALID ' else nul L End, case when (Bitand (C.defer, m) = O.status in (3, 5)) the N ' INVALID ' else null end), NULL), Decode (Bitand (C.defer, (), "DEPEND on VIEW", null) from sys.con$ OC, sys.con$ RC, sys. " _base_user "OU, sys." _base_user "Ru, sys." _current_edition_obj "Ro, sys." _current_edition_obj "O, sys.cdef$ C, sys.obj$ oi, sys.user$ uiwhere oc.owner# = ou.user# and oc.con# = c.con# andc.obj# = o.obj# and c.type#! = 8 and (c.type# < + or c.type# >)/*/don ' t include supplog cons */and (c. type#! =)/* don ' t include log Group cons */And c.rcon# = rc.con# (+) and c.enabled = oi.obj# (+) A nd oi.owner# = ui.user# (+) and rc.owner# = ru.user# (+) and c.robj# = ro.obj# (+) and (o.owner# = Userenv (' SchemaID ') or o.obj# in (select obj# from sys.objauth$ where grantee# in (select Kzsrorol From X$kzsro)) OR/* User has System privileges */exists (select null from V$enabledprivs where Priv_number in ( -45 */LOCK any table */, -47/* SELECT any table */, -48/* INSERT any table */, -49/* UPDATE any table */,-50/* DELETE any TABLE */)))
SYS. All_cons_columns is defined as follows:
CREATE OR REPLACE VIEW all_cons_columns (owner, CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME, position) Asselect U.name, C.name, O.name, decode (ac.name, NULL, Col.name, ac.name), Cc.pos#from sys.user$ u, sys.con$ C, sys.col$ Col, Sys.cco l$ cc, sys.cdef$ CD, sys. " _current_edition_obj "O, sys.attrcol$ acwhere c.owner# = u.user# and c.con# = cd.con# and (cd.type# < + or cd.type# > */* don ' t include supplog cons */and (cd.type#! =)/* Don't include log group cons */ and cd.con# = cc.con# and cc.obj# = col.obj# and cc.intcol# = col.intcol# and cc.obj# = o.obj# and (c.owner# = Userenv (' SchemaID ') or cd.obj# in (select obj# from sys.objauth$ where grantee# I N (select Kzsrorol from X$kzsro) ) or/* User has System privileges */exists (select null from V$enabledprivs WHere Priv_number in ( -45/* LOCK any table */, -47/* SELECT any table */, -48/* INSERT any table */, -49/* UPDATE any table */, -50/* DELETE any TABLE */))) and col.obj# = ac.obj# (+ ) and col.intcol# = ac.intcol# (+)
Definition and SYS of sys.all_constraints in Oracle DB 11.2.0.4. Definition of All_cons_columns