Background documentationData Type (data_type) Locate this document in the navigation structure

 

A column definition (column_definition) can contain both the column name (column_name) and data types.

The following data types can be distinguished:

The non-NULL values can be specified using the syntax element data_type.

Structure

Syntax Syntax

  1. <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
    
End of the code.

For more information on ASCII, BYTE or UNICODE, see the section Code Attribute.

Explanation

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 (data_type)

Data Type

Is Mapped To

BINARY(p)

FIXED(p)

DEC[IMAL](p,s)

FIXED(p,s)

DEC[IMAL](p)

FIXED(p)

DEC[IMAL]

FIXED(5)

DOUBLE PRECISION

FLOAT(38)

FLOAT

FLOAT(16)

FLOAT(39..64)

FLOAT(38)

LONG [ASCII]

CLOB

LONG BYTE

BLOB

LONG UNICODE

CLOB UNICODE

LONG VARCHAR

CLOB

NCHAR(p)

CHAR(p) UNICODE

NCLOB

CLOB UNICODE

NVARCHAR(p)

VARCHAR(p) UNICODE

NUMERIC(p,s)

FIXED(p,s)

NUMERIC(p)

FIXED(p)

NUMERIC

FIXED(5)

REAL(p)

FLOAT(p)

REAL

FLOAT(16)

SERIAL

FIXED(10) DEFAULT SERIAL

SERIAL(p)

FIXED(10) DEFAULT SERIAL(p)