0% found this document useful (0 votes)
4 views2 pages

Datatypes

Uploaded by

Suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

Datatypes

Uploaded by

Suresh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Oracle supplies the following built-in datatypes:

 character datatypes
o CHAR
o NCHAR
o VARCHAR2 and VARCHAR
o NVARCHAR2
o CLOB
o NCLOB
o LONG
 NUMBER datatype
 DATE datatype
 binary datatypes
o BLOB
o BFILE
o RAW
o LONG RAW
 Table 5-1 Summary of Oracle Built-In Datatypes

Datatype Description Column Length and Default


CHAR (size) Fixed-length character data Fixed for every row in the table (with trailing
of length size bytes. blanks); maximum size is 2000 bytes per
row, default size is 1 byte per row. Consider
the character set (one-byte or multibyte)
before setting size.
VARCHAR2 Variable-length character Variable for each row, up to 4000 bytes per
(size) data. row. Consider the character set (one-byte or
multibyte) before setting size. A
maximum size must be specified.
NCHAR(size) Fixed-length character data Fixed for every row in the table (with trailing
of length size characters or blanks). Column size is the number of
bytes, depending on the characters for a fixed-width national
national character set. character set or the number of bytes for a
varying-width national character set.
Maximum size is determined by the number
of bytes required to store one character, with
an upper limit of 2000 bytes per row. Default
is 1 character or 1 byte, depending on the
character set.
NVARCHAR2 Variable-length character Variable for each row. Column size is the
(size) data of length size characters number of characters for a fixed-width
or bytes, depending on national character set or the number of bytes
national character set. A for a varying-width national character set.
maximum size must be Maximum size is determined by the number
specified. of bytes required to store one character, with
an upper limit of 4000 bytes per row. Default
is 1 character or 1 byte, depending on the
character set.
CLOB Single-byte character data. Up to 2^32 - 1 bytes, or 4 gigabytes.
NCLOB Single-byte or fixed-length Up to 2^32 - 1 bytes, or 4 gigabytes.
multibyte national character
set (NCHAR) data.
LONG Variable-length character Variable for each row in the table, up to 2^31
data. - 1 bytes, or 2 gigabytes, per row. Provided
for backward compatibility.
NUMBER (p, Variable-length numeric Variable for each row. The maximum space
s) data. Maximum required for a given column is 21 bytes per
precision p and/or scale s is row.
38.
DATE Fixed-length date and time Fixed at 7 bytes for each row in the table.
data, ranging from Jan. 1, Default format is a string (such as DD-
4712 B.C.E. to Dec. 31, 4712 MON-YY) specified by
C.E. NLS_DATE_FORMAT parameter.
BLOB Unstructured binary data. Up to 2^32 - 1 bytes, or 4 gigabytes.
BFILE Binary data stored in an Up to 2^32 - 1 bytes, or 4 gigabytes.
external file.
RAW (size) Variable-length raw binary Variable for each row in the table, up to 2000
data. bytes per row. A maximum size must be
specified. Provided for backward
compatibility.
LONG RAW Variable-length raw binary Variable for each row in the table, up to 2^31
data. - 1 bytes, or 2 gigabytes, per row. Provided
for backward compatibility.
ROWID Binary data representing row Fixed at 10 bytes (extended ROWID) or 6
addresses. bytes (restricted ROWID) for each row in the
table.
MLSLABEL Trusted Oracle datatype. See the Trusted Oracle documentation.

You might also like