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

本站中文解释

Oracle视图ALL_TYPE_ATTRS保存了给定用户或当前用户拥有类型属性的信息。如果它被用来查看类型属性,只有拥有SELECT_CATALOG_ROLE或SELECT ANY DICTIONARY系统权限的用户视图才可以访问。

使用此视图,用户可以查看存储在数据库中的全部或特定类型的类型属性。用户可以使用此视图查找类型属性的位置,数据类型,字节长度,标识,缺省值,缩放比例等。

使用ALL_TYPE_ATTRS视图的主要功能包括:

1.使用OWNER列来查找特定类型的类型属性;
2.从特定类型检索类型属性;
3.使用PRECISION,SCALE,LENGTH等列来查看类型属性的类型信息;
4.使用DEFAULT,NULLABLE,IDENTITY列等来检查类型属性的缺省值,是否可为空,是否具有标识等;
5.使用SEQUENCE_OWNER,SEQUENCE_NAME等来检查类型的序列。

官方英文解释

ALL_TYPE_ATTRS describes the attributes of the object types accessible to the current user.

Related Views

  • DBA_TYPE_ATTRS describes the attributes of all object types in the database. This view does not include the CHAR_USED column.

  • USER_TYPE_ATTRS describes the attributes of the object types owned by the current user. This view does not display the OWNER or CHAR_USED column.

Column Datatype NULL Description

OWNER

VARCHAR2(128)

Owner of the type

TYPE_NAME

VARCHAR2(128)

Name of the type

ATTR_NAME

VARCHAR2(128)

Name of the attribute

ATTR_TYPE_MOD

VARCHAR2(7)

Type modifier of the attribute:

  • REF

  • POINTER

ATTR_TYPE_OWNER

VARCHAR2(128)

Owner of the type of the attribute

ATTR_TYPE_NAME

VARCHAR2(128)

Name of the type of the attribute

LENGTH

NUMBER

Length of the CHAR attribute, or maximum length of the VARCHAR or VARCHAR2 attribute.

PRECISION

NUMBER

Decimal precision of the NUMBER or DECIMAL attribute, or binary precision of the FLOAT attribute.

SCALE

NUMBER

Scale of the NUMBER or DECIMAL attribute

CHARACTER_SET _NAME

VARCHAR2(44)

Character set name of the attribute (CHAR_CS or NCHAR_CS)

ATTR_NO

NUMBER

Syntactical order number or position of the attribute as specified in the type specification or CREATE TYPE statement (not to be used as an ID number)

INHERITED

VARCHAR2(3)

Indicates whether the attribute is inherited from a supertype (YES) or not (NO)

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_TYPE_ATTRS”

  • “USER_TYPE_ATTRS”


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