ANYDATA介绍
ANYDATA特殊列,属于Oracle内建列,对于Oracle数据库,每一个值都是一种数据类型。当用户创建表或聚簇时,需要为每一个列指定对应的数据类型。即使是创建存储过程或函数的时,一样需要为参数指定相应的数据类型。
一个数据类型可以是标量的或非标量的,标的包含一个原子值,非标量的(有时成为集合)包含一个集合值。LOB(Large Object)就是一个特殊形式的标量数据类型表示大量的标量、二进制或字符数据,
Oracle内建数据类型可分为如下几类:
Oracle中通过Code代码来指代相应的数据类型,如下表所示:
Table 2-1 Built-in Data Type Summary
Code | Data Type | Description |
---|---|---|
1 |
| Variable-length character string having maximum length
Refer to "Extended Data Types" for more information on the
|
1 |
| Variable-length Unicode character string having maximum length
Refer to "Extended Data Types" for more information on the |
2 |
| Number having precision |
2 |
| A subtype of the |
8 |
| Character data of variable length up to 2 gigabytes, or 231 -1 bytes. Provided for backward compatibility. |
12 |
| Valid date range from January 1, 4712 BC, to December 31, 9999 AD. The default format is determined explicitly by the |
100 |
| 32-bit floating point number. This data type requires 4 bytes. |
101 |
| 64-bit floating point number. This data type requires 8 bytes. |
180 |
| Year, month, and day values of date, as well as hour, minute, and second values of time, where |
181 |
| All values of |
231 |
| All values of
The default format is determined explicitly by the |
182 |
| Stores a period of time in years and months, where |
183 |
| Stores a period of time in days, hours, minutes, and seconds, where
The size is fixed at 11 bytes. |
23 |
| Raw binary data of length
Refer to "Extended Data Types" for more information on the |
24 |
| Raw binary data of variable length up to 2 gigabytes. |
69 |
| Base 64 string representing the unique address of a row in its table. This data type is primarily for values returned by the |
208 |
| Base 64 string representing the logical address of a row of an index-organized table. The optional |
96 |
| Fixed-length character data of length
|
96 |
| Fixed-length character data of length |
112 |
| A character large object containing single-byte or multibyte characters. Both fixed-width and variable-width character sets are supported, both using the database character set. Maximum size is (4 gigabytes - 1) * (database block size). |
112 |
| A character large object containing Unicode characters. Both fixed-width and variable-width character sets are supported, both using the database national character set. Maximum size is (4 gigabytes - 1) * (database block size). Stores national character set data. |
113 |
| A binary large object. Maximum size is (4 gigabytes - 1) * (database block size). |
114 |
| Contains a locator to a large binary file stored outside the database. Enables byte stream I/O access to external LOBs residing on the database server. Maximum size is 4 gigabytes. |
Any Types
Any类型用于处理未知的过程参数和表列的实际类型。该数据类型可以让你动态的封装和访问类型描述,数据实例和任何SQL类的实例数据集,这些类型由OCI和PL/SQL接口构造和访问
ANYTYPE
该类型包含一个对任何SQL类型的名或未命名的临时类型的类型描述。
ANYDATA
该类型包含一个给定的类型实例,数据类型加描述,ANYDATA可以向表中列的数据类型那样使用,并且将各种混杂的值存于该列之中。这些值可以是SQL内建类型和用户定义类型。
ANYDATASET
该类型包含一个给定的类型描述加类型实例集,ANYDATASET可灵活的用于过程参数数据类型,这些值同样可以是SQL内建类型和用户定义类型。
数据类型的介绍:
http://docs.oracle.com/database/121/SQLRF/sql_elements001.htm#SQLRF0021
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341