您好,登錄后才能下訂單哦!
ANYDATA特殊列,屬于Oracle內(nèi)建列,對(duì)于Oracle數(shù)據(jù)庫(kù),每一個(gè)值都是一種數(shù)據(jù)類型。當(dāng)用戶創(chuàng)建表或聚簇時(shí),需要為每一個(gè)列指定對(duì)應(yīng)的數(shù)據(jù)類型。即使是創(chuàng)建存儲(chǔ)過(guò)程或函數(shù)的時(shí),一樣需要為參數(shù)指定相應(yīng)的數(shù)據(jù)類型。
一個(gè)數(shù)據(jù)類型可以是標(biāo)量的或非標(biāo)量的,標(biāo)的包含一個(gè)原子值,非標(biāo)量的(有時(shí)成為集合)包含一個(gè)集合值。LOB(Large Object)就是一個(gè)特殊形式的標(biāo)量數(shù)據(jù)類型表示大量的標(biāo)量、二進(jìn)制或字符數(shù)據(jù),
Oracle內(nèi)建數(shù)據(jù)類型可分為如下幾類:
Oracle中通過(guò)Code代碼來(lái)指代相應(yīng)的數(shù)據(jù)類型,如下表所示:
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類型用于處理未知的過(guò)程參數(shù)和表列的實(shí)際類型。該數(shù)據(jù)類型可以讓你動(dòng)態(tài)的封裝和訪問(wèn)類型描述,數(shù)據(jù)實(shí)例和任何SQL類的實(shí)例數(shù)據(jù)集,這些類型由OCI和PL/SQL接口構(gòu)造和訪問(wèn)
該類型包含一個(gè)對(duì)任何SQL類型的名或未命名的臨時(shí)類型的類型描述。
該類型包含一個(gè)給定的類型實(shí)例,數(shù)據(jù)類型加描述,ANYDATA可以向表中列的數(shù)據(jù)類型那樣使用,并且將各種混雜的值存于該列之中。這些值可以是SQL內(nèi)建類型和用戶定義類型。
該類型包含一個(gè)給定的類型描述加類型實(shí)例集,ANYDATASET可靈活的用于過(guò)程參數(shù)數(shù)據(jù)類型,這些值同樣可以是SQL內(nèi)建類型和用戶定義類型。
數(shù)據(jù)類型的介紹:
http://docs.oracle.com/database/121/SQLRF/sql_elements001.htm#SQLRF0021
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。