Oracle 视图 ALL_CONS_OBJ_COLUMNS 官方解释,作用,如何使用详细说明
本站中文解释
ALL_CONS_OBJ_COLUMNS是Oracle中用于查询用户定义的所有约束的对象,包括字段的视图。它提供有关连接字段和对象信息,其中在一个约束中涉及的表和列。 可以使用这一视图来获取用户定义表中列的约束类型,例如UNIQUE,PRIMARY KEY,FOREIGN KEY等。
使用方法:
SELECT OWNER,TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME
FROM ALL_CONS_OBJ_COLUMNS
WHERE OWNER= :owner_name
AND TABLE_NAME= :table_name;
上述查询可以用来检索指定Schema的指定表的所有列的约束和列名。
官方英文解释
ALL_CONS_OBJ_COLUMNS
displays information about the types that object columns (or attributes) or collection elements have been constrained to, in the tables accessible to the current user.
Related Views
-
DBA_CONS_OBJ_COLUMNS
displays information about the types that object columns (or attributes) or collection elements have been constrained to, in all tables in the database. -
USER_CONS_OBJ_COLUMNS
displays information about the types that object columns (or attributes) or collection elements have been constrained to, in the tables owned by the current user. This view does not display theOWNER
column.
Column | Datatype | NULL | Description |
---|---|---|---|
|
|
Owner of the table |
|
|
|
Name of the table containing the object column or attribute |
|
|
|
Fully qualified name of the object column or attribute |
|
|
|
Owner of the type that the column (or element) is constrained to |
|
|
|
Name of the type that the column (or element) is constrained to |
|
|
|
Indicates whether the column (or element) is constrained to |
See Also:
-
“DBA_CONS_OBJ_COLUMNS”
-
“USER_CONS_OBJ_COLUMNS”