The table that follows(跟随,遵照) summarizes(总结,概述) Oracle built-in data types. Refer(参考,查阅) to the syntax(语法,句法)in the preceding(在...之前,前) sections(截面,节段,部分) for the syntactic(句法的,语法结构) elements(元素,成份,原理). The codes(编码,代码) listed(列出) for the data types are used internally(内部的) by Oracle Database. The data type code of a column or object attribute is returned by the<wbr><code style="font-family:monospace; font-size:12px">DUMP(倾倒)</code><wbr>function.</wbr></wbr>
Table 3-1 Built-in Data Type Summary(概要,简要)
1 |
|
Variable-length(变长,可变长度) character(字符,特性) string having(所有,具有) maximum length<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>bytes or characters. Maximum<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>is 4000 bytes or characters, and minimum is 1 byte or 1 character. You must specify(指定,列举)<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>for<wbr><code style="font-family:monospace; font-size:12px">VARCHAR2</code>.</wbr></wbr></wbr></wbr></wbr></wbr></wbr> |
1 |
|
Variable-length Unicode character string having maximum length<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>characters. The number of bytes can be up to two times<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size(可达两倍大小)<wbr></wbr></span></code>for(为)<wbr><code style="font-family:monospace; font-size:12px">AL16UTF16</code><wbr>encoding and three times<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>for<wbr><code style="font-family:monospace; font-size:12px">UTF8</code><wbr>encoding(3次UTF8编码的大小). Maximum<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>is determined(决定了) by the national character set(集合) definition(定义,解说), with(支持) an upper(上面的,较高的) limit(限制) of 4000 bytes. You must specify<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>for<wbr><code style="font-family:monospace; font-size:12px">NVARCHAR2</code>.</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr> |
2 |
|
Number having precision(精度,精确的)<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">p</span></code><wbr>and scale(刻度)<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">s</span></code>. The precision<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">p</span></code><wbr>can range(范围) from 1 to 38. The scale<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">s</span></code><wbr>can range from -84 to 127. Both(两者) precision and scale are in decimal digits(小数位数). A<wbr><code style="font-family:monospace; font-size:12px">NUMBER</code><wbr>value requires(需要) from 1 to 22 bytes.</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr> |
2 |
|
A subtype(图表类型) of the<wbr><code style="font-family:monospace; font-size:12px">NUMBER</code><wbr>data type having precision<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">p</span></code>. A<wbr><code style="font-family:monospace; font-size:12px">FLOAT</code><wbr>value is represented(代表,表现) internally(内部) as<wbr><code style="font-family:monospace; font-size:12px">NUMBER</code>. The precision<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">p</span></code><wbr>can range from 1 to 126 binary digits(二进制数字). A<wbr><code style="font-family:monospace; font-size:12px">FLOAT</code><wbr>value requires(需要) from 1 to 22 bytes.</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr> |
8 |
|
Character data of variable length up to 2 gigabytes(十亿字节), or 231<wbr>-1 bytes. Provided(假如,提供) for backward(向后的) compatibility(兼容性).</wbr> |
12 |
|
Valid(有效的,正确的) date range from January(1月) 1, 4712 BC(公元前4712), to December(12月) 31, 9999 AD. The default format is determined(决定) explicitly(明确的) by(由) the |
21 |
|
32-bit floating point(点,要点) number. This data type requires(需要) 4 bytes. |
22 |
|
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<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">fractional_seconds_precision</span></code><wbr>is the number of digits(数字) in the fractional(小数) part(部分) of the<wbr><code style="font-family:monospace; font-size:12px">SECOND</code><wbr>datetime(日期时间字段域)<wbr>field. Accepted(接受) values of<wbr><span style="word-wrap:normal; word-break:normal; line-height:18px; font-size:12px"><em>ractional_seconds_precision</em></span><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">f</span></code><wbr>are 0 to 9. The default is 6. The default format is determined(决定,确定) explicitly(明确的) by the<wbr><code style="font-family:monospace; font-size:12px">NLS_TIMESTAMP_FORMAT</code><wbr>parameter or implicitly by the<wbr><code style="font-family:monospace; font-size:12px">NLS_TERRITORY</code>parameter. The size is 7 or 11 bytes, depending on(取决于,根据) the precision(不同的精度). This data type contains the datetime fields<wbr><code style="font-family:monospace; font-size:12px">YEAR</code>,<wbr><code style="font-family:monospace; font-size:12px">MONTH</code>,<wbr><code style="font-family:monospace; font-size:12px">DAY</code>,<wbr><code style="font-family:monospace; font-size:12px">HOUR</code>,<code style="font-family:monospace; font-size:12px">MINUTE</code>, and<wbr><code style="font-family:monospace; font-size:12px">SECOND</code>. It contains fractional seconds(分数秒) but does not have a time zone.</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr> |
181 |
|
All values of<wbr><code style="font-family:monospace; font-size:12px">TIMESTAMP</code><wbr>as well as(也,和...一样) time zone displacement(取代,位移) value, where<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">fractional_seconds_precision</span></code><wbr>is the number of digits in the fractional part(数字的小数部分的位数) of the<wbr><code style="font-family:monospace; font-size:12px">SECOND</code><wbr>datetime field(日期时间字段). Accepted values are 0 to 9. The default is 6. The default format is determined explicitly by the<wbr><code style="font-family:monospace; font-size:12px">NLS_TIMESTAMP_FORMAT</code><wbr>parameter or implicitly by the<wbr><code style="font-family:monospace; font-size:12px">NLS_TERRITORY</code><wbr>parameter. The size is fixed at 13 bytes. This data type contains the datetime fields()<wbr><code style="font-family:monospace; font-size:12px">YEAR</code>,<wbr><code style="font-family:monospace; font-size:12px">MONTH</code>,<wbr><code style="font-family:monospace; font-size:12px">DAY</code>,<wbr><code style="font-family:monospace; font-size:12px">HOUR</code>,<wbr><code style="font-family:monospace; font-size:12px">MINUTE</code>,<wbr><code style="font-family:monospace; font-size:12px">SECOND</code>,<wbr><code style="font-family:monospace; font-size:12px">TIMEZONE_HOUR</code>, and<wbr><code style="font-family:monospace; font-size:12px">TIMEZONE_MINUTE</code>. It has fractional seconds and an explicit(明确的) time zone.</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr> |
231 |
|
All values of<wbr><code style="font-family:monospace; font-size:12px">TIMESTAMP(时间戳</code><code style="font-family:monospace; font-size:12px">)</code><wbr><code style="font-family:monospace; font-size:12px">WITH</code><wbr><code style="font-family:monospace; font-size:12px">TIME</code><wbr><code style="font-family:monospace; font-size:12px">ZONE</code>, with the following exceptions(以下例外):</wbr></wbr></wbr></wbr>
The default format is determined(决定,确定) explicitly(明确) by the(由)<wbr><code style="font-family:monospace; font-size:12px">NLS_TIMESTAMP_FORMAT</code><wbr>parameter or implicitly by the<wbr><code style="font-family:monospace; font-size:12px">NLS_TERRITORY</code><wbr>parameter. The size is 7 or 11 bytes, depending on the precision.</wbr></wbr></wbr></wbr> |
182 |
|
Stores(存储) a period(周期,期间) of time in years and months, where<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">year_precision</span></code><wbr>is the number of digits in the<wbr><code style="font-family:monospace; font-size:12px">YEAR</code><wbr>datetime field. Accepted values are 0 to 9. The default is 2. The size is fixed(固定) at 5 bytes.</wbr></wbr></wbr></wbr> |
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<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>bytes. Maximum<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>is 2000 bytes. You must specify<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>for a<wbr><code style="font-family:monospace; font-size:12px">RAW</code><wbr>value(原始值).</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr> |
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<wbr><code style="font-family:monospace; font-size:12px">ROWID</code>pseudocolumn.</wbr> |
208 |
|
Base 64 string representing the logical(合乎逻辑的) address of a row of an index-organized(索引组织) table. The optional(可选)<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>is the size of a column of type<code style="font-family:monospace; font-size:12px">UROWID(是typeUROWID列的大小)</code>. The maximum size and default is 4000 bytes.</wbr></wbr> |
96 |
|
Fixed-length(固定长度) character data of length<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>bytes or characters. Maximum<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>is 2000 bytes or characters. Default and minimum<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code>is 1 byte.</wbr></wbr></wbr></wbr></wbr> |
96 |
|
Fixed-length character data of length<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>characters. The number of bytes can be up to(最多可以有) two times<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>for<wbr><code style="font-family:monospace; font-size:12px">AL16UTF16</code><wbr>encoding and three times<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>for<wbr><code style="font-family:monospace; font-size:12px">UTF8</code><wbr>encoding. Maximum<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>is determined(取决于,决定) by the national(国家) character set(字符集) definition(定义), with an upper limit(上限) of 2000 bytes. Default and minimum<wbr><code style="font-family:monospace; font-size:12px"><span style="word-wrap:normal; word-break:normal; line-height:18px; font-style:italic">size</span></code><wbr>is 1 character.</wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr></wbr> |
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. |
The sections(部分,截面) that follow describe the Oracle data types as they are stored in Oracle Database. For information(信息) on specifying these data types as literals(文字), refer(参考) to<wbr><a href="file:///F:/hzy/help/E11882_01/server.112/e26088/sql_elements003.htm#i11223" style="text-decoration:none; color:rgb(65,100,111)">"Literals"</a>.</wbr>