본문 바로가기
Development/DataBase

[Oracle]ALL_CONS_COLUMNS

by 폴피드 2011. 9. 1.
728x90
반응형
ColumnDatatypeNULLDescription
OWNER VARCHAR2(30) NOT NULL Owner of the constraint definition
CONSTRAINT_NAME VARCHAR2(30) NOT NULL Name of the constraint definition
TABLE_NAME VARCHAR2(30) NOT NULL Name of the table with the constraint definition
COLUMN_NAME VARCHAR2(4000)   Name of the column or attribute of the object type column specified in the constraint definition
      Note: If you create a constraint on a user-defined REF column, the system creates the constraint on the attributes that make up the REF column. Therefore, the column names displayed in this view are the attribute names, with the REF column name as a prefix, in the following form:

"REF_name"."attribute"

POSITION NUMBER   Original position of the column or attribute in the definition of the object

ALL_CONS_COLUMNS을 조회하면 위에 정보를 알수 있다. 
그리고 테이블별로 CONSTRAINT_NAME 을 알수 있기 때문에 테이블의 PK 도 조회 가능하다.  

출처 : ORACLE DOCUMENT LIBRARY 
728x90
반응형