SYS. All_constraints is defined as follows:
CREATE OR REPLACE VIEW all_constraints asselect OWNER, constraint_name, Constraint_type, TABLE_NAME, search_conditio N, SEARCH_CONDITION_VC, R_owner, R_constraint_name, Delete_rule, STATUS, deferrable, DEFERRED, VALIDATED, GENE Rated, Bad, RELY, Last_change, Index_owner, Index_name, INVALID, view_related, Origin_con_idfrom int$dba_const Raintswhere (owner = sys_context (' USERENV ', ' current_user ') or obj_id (owner, TABLE_NAME, object_type#, object_id) in (select obj# from sys.objauth$ where grantee# in (select Kzsrorol From X$KZSRO) or/* User has system Privileg ES */exists (select null from V$enabledprivs where Priv_number in ( -45/* LOCK any TABLE */, -47/* SELECT any TABLE */, -397/* READ any TA BLE */, -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 */, -397/* READ 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 12.1.0.2. Definition of All_cons_columns