0% found this document useful (0 votes)
67 views5 pages

Varchar2 Byte Char: Size Size Size Size

The document describes Oracle database datatypes including their descriptions, maximum sizes, and storage requirements. It covers character strings, numbers, dates, binary data types, LOBs, ROWIDs and more. Data types include VARCHAR2, NVARCHAR2, NUMBER, DATE, TIMESTAMP, RAW, BLOB and others. Storage requirements vary from 1 to 22 bytes depending on the specific data type.

Uploaded by

ragini0376
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views5 pages

Varchar2 Byte Char: Size Size Size Size

The document describes Oracle database datatypes including their descriptions, maximum sizes, and storage requirements. It covers character strings, numbers, dates, binary data types, LOBs, ROWIDs and more. Data types include VARCHAR2, NVARCHAR2, NUMBER, DATE, TIMESTAMP, RAW, BLOB and others. Storage requirements vary from 1 to 22 bytes depending on the specific data type.

Uploaded by

ragini0376
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Cod e Datatype 1

Description Variable-length character string having maximum length size bytes or characters. Maximum size is 4000 bytes or characters, and minimum is 1 byte or 1 character. You must specify size for VARCHAR2.

VARCHAR2(size [BYTE | CHAR])

BYTE indicates that the column will have byte length semantics. CHAR indicates that
the column will have character semantics. 1

NVARCHAR2(size)

Variable-length Unicode character string having maximum length size characters. The number of bytes can be up to two times size for AL16UTF16 encoding and three times size for UTF8 encoding. Maximum size is determined by the national character set definition, with an upper limit of 4000 bytes. You must specify size for NVARCHAR2. Number having precision p and scale s. The precision p can range from 1 to 38. The scale s can range from -84 to 127. Both precision and scale are in decimal digits. A NUMBER value requires from 1 to 22 bytes. A subtype of the NUMBER datatype having precision p. A FLOAT value is represented internally as NUMBER. The precision p can range from 1 to 126 binary digits. A FLOAT value requires from 1 to 22 bytes. Character data of variable length up to 2 gigabytes, or 231 -1 bytes. Provided for backward compatibility. Valid date range from January 1, 4712 BC, to December 31, 9999 AD. The default format is determined explicitly by the NLS_DATE_FORMAT parameter or

NUMBER [ (p [, s]) ]

FLOAT [(p)]

LONG

12

DATE

Cod e Datatype

Description implicitly by the NLS_TERRITORY parameter. The size is fixed at 7 bytes. This datatype contains the datetime fields YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND. It does not have fractional seconds or a time zone.

21 22

BINARY_FLOAT BINARY_DOUBLE

32-bit floating point number. This datatype requires 5 bytes, including the length byte. 64-bit floating point number. This datatype requires 9 bytes, including the length byte.

180 TIMESTAMP Year, month, and day values of date, as [(fractional_seconds_preci well as hour, minute, and second values of time, where sion)] fractional_seconds_precision is the number of digits in the fractional part of the SECOND datetime field. Accepted values of

fractional_seconds_precision
are 0 to 9. The default is 6. The default format is determined explicitly by the NLS_DATE_FORMAT parameter or implicitly by the NLS_TERRITORY parameter. The sizes varies from 7 to 11 bytes, depending on the precision. This datatype contains the datetime fields YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND. It contains fractional seconds but does not have a time zone. 181 TIMESTAMP [(fractional_seconds)] WITH All values of TIMESTAMP as well as time zone displacement value, where

TIME ZONE

fractional_seconds_precision is
the number of digits in the fractional part of the SECOND datetime field. Accepted values are 0 to 9. The default is 6. The default format is determined explicitly by the NLS_DATE_FORMAT parameter or implicitly by the NLS_TERRITORY parameter. The size is fixed at 13 bytes.

Cod e Datatype

Description This datatype contains the datetime fields YEAR, MONTH, DAY, HOUR, MINUTE, SECOND, TIMEZONE_HOUR, and TIMEZONE_MINUTE. It has fractional seconds and an explicit time zone.

231 TIMESTAMP [(fractional_seconds)] WITH

All values of TIMESTAMP WITH TIME ZONE, with the following exceptions:

LOCAL TIME ZONE


Data is normalized to the database time zone when it is stored in the database. When the data is retrieved, users see the data in the session time zone.

The default format is determined explicitly by the NLS_DATE_FORMAT parameter or implicitly by the NLS_TERRITORY parameter. The sizes varies from 7 to 11 bytes, depending on the precision. 182 INTERVAL YEAR [(year_precision)] TO MONTH Stores a period of time in years and months, where year_precision is the number of digits in the YEAR datetime field. Accepted values are 0 to 9. The default is 2. The size is fixed at 5 bytes. Stores a period of time in days, hours, minutes, and seconds, where

183 INTERVAL DAY [(day_precision)] TO SECOND [(fractional_seconds)]

day_precision is the maximum number of digits in the DAY


datetime field. Accepted values are 0 to 9. The default is 2.

fractional_seconds_preci sion is the number of digits in the fractional part of the SECOND field.
Accepted values are 0 to 9. The default is 6.

The size is fixed at 11 bytes.

Cod e Datatype 23

Description Raw binary data of length size bytes. Maximum size is 2000 bytes. You must specify size for a RAW value. Raw binary data of variable length up to 2 gigabytes. Base 64 string representing the unique address of a row in its table. This datatype is primarily for values returned by the ROWID pseudocolumn. Base 64 string representing the logical address of a row of an index-organized table. The optional size is the size of a column of type UROWID. The maximum size and default is 4000 bytes. Fixed-length character data of length size bytes or characters. Maximum size is 2000 bytes or characters. Default and minimum size is 1 byte.

RAW(size)

24 69

LONG RAW ROWID

208 UROWID [(size)]

96

CHAR [(size [BYTE | CHAR])]

BYTE and CHAR have the same semantics as for VARCHAR2.


96

NCHAR[(size)]

Fixed-length character data of length size characters. The number of bytes can be up to two times size for AL16UTF16 encoding and three times size for UTF8 encoding. Maximum size is determined by the national character set definition, with an upper limit of 2000 bytes. Default and minimum size is 1 character. A character large object containing singlebyte or multibyte characters. Both fixedwidth and variable-width character sets are supported, both using the database character set. Maximum size is (4 gigabytes - 1) * (database block size). A character large object containing Unicode characters. Both fixed-width and

112 CLOB

112 NCLOB

Cod e Datatype

Description 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 BLOB 114 BFILE

A binary large object. Maximum size is (4 gigabytes - 1) * (database block size). 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.

You might also like