ANYDATA介绍
ANYDATA特殊列,属于Oracle内建列,对于Oracle数据库,每一个值都是一种数据类型。当用户创建表或聚簇时,需要为每一个列指定对应的数据类型。即使是创建存储过程或函数的时,一样需要为参数指定相应的数据类型。
10年积累的成都网站建设、做网站经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站设计后付款的网站建设流程,更有江城免费网站建设让你可以放心的选择与我们合作。
一个数据类型可以是标量的或非标量的,标的包含一个原子值,非标量的(有时成为集合)包含一个集合值。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
网站栏目:ANYDATA介绍
文章起源:http://scyanting.com/article/pjgdhs.html