Definition and SYS of sys.all_constraints in Oracle DB 12.1.0.2. Definition of All_cons_columns

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.