| In this case, the precision is 38 and the specified scale is maintained. |
DATE Datatype | The DATE datatype stores point-in-time values, such as dates and times. Date data is stored in fixed length fields of seven bytes each. |
LONG Datatype | Columns defined as LONG store variable length character data containing up to two gigabytes of information. LONG data is text data, and is appropriately converted when moved between different character sets. LONG data cannot be indexed. |
RAW and LONG RAW Datatypes | RAW is a variable length datatype like the VARCHAR2 character datatype, except that SQL*Net (which connects users sessions to the instance) and the Import and Export utilities do not perform character conversion when transmitting RAW or LONG RAW data. In contrast, SQL*Net and Export/Import automatically convert CHAR, VARCHAR2, and LONG data between the database character set and the user session character set (set by the NLS_LANGUAGE parameter of the ALTER SESSION command) if the two character sets are different. |
| LONG RAW data cannot be indexed, while RAW data can be indexed. |
ROWIDs and the ROWID Datatype | Every row in a non-clustered table of an Oracle database is assigned a unique ROWID that corresponds to the physical address of a row's row piece (or the initial row piece if the row is chained among multiple row pieces). |
| Each table in an Oracle database internally has a pseudo-column named ROWID. This pseudo-column is not evident when listing the structure of a table by executing a SELECT statement, or a DESCRIBE statement using SQL*Plus, but can be retrieved with a SQL query using the reserved word ROWID as a column name. |
| ROWIDs use a binary representation of the physical address for each row selected. A ROWID's VARCHAR2 hexadecimal representation is divided into three pieces: block.slot.file. Here, block is the data block within a file that contains the row, relative to its datafile; row is the row in the block; and file is the datafile that contains the row. A row's assigned ROWID remains unchanged usually. Exceptions occur when the row is exported and imported (using the Import and Export utilities). When a row is deleted from a table (and the encompassing transaction is committed), the deleted row's associated ROWID can be assigned to a row inserted in a subsequent transaction. |
MLSLABEL Datatype | Trusted Oracle7 provides one special datatype, called MLSLABEL. You can declare columns of this datatype in standard Oracle, as well as Trusted Oracle7, for compatibility with Trusted Oracle7 applications. |
| The MLSLABEL datatype stores a variable length tag (two to five bytes) that represents a binary label in the data dictionary. The ALL_LABELS data dictionary view lists all of the labels ever stored in the database. |
Datatype
| Description
| Column Length (bytes)
|
CHAR (size)
| Fixed length character data of length size.
| Fixed for every row in the table (with trailing spaces); maximum size is 255 bytes per row, default size is one byte per row. Consider the character set that is used before setting size. (Are you using a one or two byte character set?)
|
VARCHAR2 (size)
| Variable length character data. A maximum size must be specified.
| Variable for each row, up to 2000
bytes per row. Consider the character set that is used before setting size. (Are you using a one or two byte
character set?)
|
NUMBER (p, s)
| Variable length numeric data. Maximum precision p and/or scale s is 38.
| Variable for each row. The maximum space required for a given column is 21 bytes per row.
|
DATE
| Fixed length date and time data, ranging from January 1, 4712 B.C. to December 31, 4712 A.D. Default format: DD-MON-YY.
| Fixed at seven bytes for each row in the table.
|
LONG
| Variable length character data.
| Variable for each row in the table up to 2^31 bytes, or two gigabytes, per row.
|
RAW (size)
| Variable length raw binary data. A maximum size must be specified.
| Variable for each row in the table, up to 255 bytes per row.
|
LONG RAW
| Variable length raw binary data.
| Variable for each row in the table, up to 2^31 bytes, or two gigabytes, per row.
|
ROWID
| Binary data representing row addresses.
| Fixed at six bytes for each row in the table.
|
MLSLABEL
| Variable length binary data representing OS labels.
| Variable for each row in the table, ranging from two to five bytes per row.
|