Data Type (data_type)
A column definition (column_definition) can contain both the column name (column_name
) and data types.
The following data types can be distinguished:
Non-NULL
values
Character String, LOB Column (CLOB, BLOB), Number, Date Value, Time Value, Time Stamp Value, BOOLEAN
The non-NULL
values can be specified using the syntax element data_type
.
Syntax
<data_type> ::=
CHAR[ACTER][(<unsigned_integer>)] [ASCII | BYTE | UNICODE]
| VARCHAR[(<unsigned_integer>)] [ASCII | BYTE | UNICODE]
| CLOB [ASCII | UNICODE]
| BLOB
| BOOLEAN
| FIXED(<unsigned_integer> [,<unsigned_integer>])
| FLOAT(<unsigned_integer>)
| INT[EGER]
| SMALLINT
| DATE
| TIME
| TIMESTAMP
For more information on ASCII
, BYTE
or UNICODE
, see the section Code Attribute.
SQL Tutorial, Tables, Number Generator for a Single Column of a Table
In addition to the data types defined above, the following data types are also permitted in a column definition. The table below also indicates the way these are mapped to the above-mentioned data types.
Data Type |
Is Mapped To |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Memory Requirements of a Column Value According to Data Type
SQL Tutorial, Converting Values