Oracle 视图 ALL_PLSQL_TYPE_ATTRS 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图ALL_PLSQL_TYPE_ATTRS包含当前用户的对象类型的属性的信息。
此视图包括以下列:
OBJECT_NAME:对象的名称。
ATTR_NAME:类型中的属性的名称。
DATA_LEVEL:每个属性的数据级别。
DATA_TYPE:每个属性的数据类型(VARCHAR2、NUMBER 等)。
DATA_LENGTH:每个属性的数据长度。
DATA_SCALE:每个属性的数据精度。
典型用途:ALL_PLSQL_TYPE_ATTRS 视图通常用于特定对象类型中的属性的检查,以便可以更好地构建 select 语句。
使用步骤:
1.使用all_plsql_type_attrs 视图可以检索特定对象类型中的所有属性:
例如:
SELECT * FROM all_plsql_type_attrs WHERE object_name = ‘MY_TYPE’;
2.根据属性DATA_TYPE、DATA_LENGTH、DATA_SCALE构建 select 语句,具体依据如下:
(1) DATA_TYPE中的数值表示每个属性的数据类型,决定如何在select 语句中构建。
(2) DATA_LENGTH表示每个属性的数据长度,NUMBER类型的DATA_LENGTH和DATA_SCALE表示精度,决定数值的精度。
(3) 根据DATA_TYPE、DATA_LENGTH 和 DATA_SCALE,可以构建出完整的 select 语句。
官方英文解释
ALL_PLSQL_TYPE_ATTRS
describes the attributes of PL/SQL types accessible to the user.
Related Views
DBA_PLSQL_TYPE_ATTRS
describes the attributes of all PL/SQL types in the database.USER_PLSQL_TYPE_ATTRS
describes the attributes of the user’s own PL/SQL types. This view does not display theOWNER
orCHAR_USED
columns.
Column | Datatype | NULL | Description |
---|---|---|---|
|
| Owner of the type | |
|
| Name of the type | |
|
| Name of the package containing the type | |
|
| Name of the attribute | |
|
| Type modifier of the attribute | |
|
| Owner of the type of the attribute | |
|
| Name of the type of the attribute | |
|
| Name of the package containing the attribute type | |
|
| Length of the | |
|
| Decimal precision of the | |
|
| Scale of the | |
|
| Character set name of the attribute | |
|
| Syntactical order number or position of the attribute as specified in the type specification or | |
|
|
|
See Also:
“DBA_PLSQL_TYPE_ATTRS”
“USER_PLSQL_TYPE_ATTRS”
编辑:一起学习网
标签:属性,视图,类型,语句,对象