Oracle 视图 ALL_COLL_TYPES 官方解释,作用,如何使用详细说明

本站中文解释

ALL_COLL_TYPES视图显示在当前用户下所有用户定义的集合类型的信息。

它的列包括:

OWNER:该集合类型的拥有者;

TYPE_NAME:该集合类型的名称;

TYPE_OID:该集合类型的对象标识符;

ELEMENT_TYPE_OWNER:该集合类型的元素类型所有者;

ELEMENT_TYPE_NAME:该集合类型的元素类型的名称;

ELEMENT_TYPE_ARITY:集合的维度数或元素的个数;

COLL_TYPE:定义集合的存储格式和操作方法;

ATTRIBUTE:集合可以有一些属性,ATTRIBUTE字段就记录这些属性;

Method:集合是一种复合对象,通过此字段记录了集合的具体操作方法;

ENABLED:用户定义的集合类型是否处于可用状态;

Element Single Datatype:定义集合元素中单个数据类型或用于定义集合元素中的表的列;

Scalar Attribute Data Type:用于确定集合属性的数据类型;

NUMERIC_PRECISION:数值精度。

可以使用ALL_COLL_TYPES视图在用户空间中检索已创建的集合类型。例如,可以使用下面的SQL语句检索特定用户所有用户定义的集合类型:

SELECT * FROM ALL_COLL_TYPES WHERE OWNER=’ORACLE’

官方英文解释

ALL_COLL_TYPES describes all named collection types (varrays and nested tables) accessible to the current user.

Related Views

  • DBA_COLL_TYPES describes all named collection types in the database.

  • USER_COLL_TYPES describes all named collection types owned by the current user. This view does not display the OWNER column.

Column Datatype NULL Description

OWNER

VARCHAR2(128)

NOT NULL

Owner of the collection

TYPE_NAME

VARCHAR2(128)

NOT NULL

Name of the collection

COLL_TYPE

VARCHAR2(128)

NOT NULL

Description of the collection, such as VARYING ARRAY, [nested] TABLE

UPPER_BOUND

NUMBER

For varrays only, maximum size

ELEM_TYPE_MOD

VARCHAR2(7)

Type modifier of the element

ELEM_TYPE_OWNER

VARCHAR2(128)

Owner of the type upon which the collection is based. This value is useful primarily for a user-defined type.

ELEM_TYPE_NAME

VARCHAR2(128)

Name of the data type or user-defined type upon which the collection is based

LENGTH

NUMBER

Length of CHAR elements or maximum length of VARCHAR or VARCHAR2 elements

PRECISION

NUMBER

Decimal precision of NUMBER or DECIMAL elements; binary precision of FLOAT elements

SCALE

NUMBER

Scale of NUMBER or DECIMAL elements

CHARACTER_SET_NAME

VARCHAR2(44)

Name of the character set (CHAR_CS | NCHAR_CS)

ELEM_STORAGE

VARCHAR2(7)

Obsolete column

NULLS_STORED

VARCHAR2(3)

Obsolete column

CHAR_USED

VARCHAR2(1)

Indicates whether the attribute uses BYTE length semantics (B) or CHAR length semantics (C). For NCHAR and NVARCHAR2 attribute types, this value is always C.

See Also:

  • “DBA_COLL_TYPES”

  • “USER_COLL_TYPES”


数据运维技术 » Oracle 视图 ALL_COLL_TYPES 官方解释,作用,如何使用详细说明