Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 47
TYPE Clause
TYPE Clause
The TYPE clause performs either of two functions:
•
It declares the type and size of a variety of data types.
•
It declares a data structure by referring to a previously defined structure.
data-type
explicitly declares the data type of the structure without reference to any
existing structure.
CHARACTER length
represents a character string; length is the number of characters in a
CHARACTER type field. The maximum values for length follow:
•
255 bytes for FORTRAN, which allows 255 ASCII characters or 127
national characters
{ data-type }
TYPE { def-name }
{* }
data type is:
{ CHARACTER length }
{ }
{ BINARY 8 [ UNSIGNED ] }
{ BINARY [ 16 [ , scale ] ] [ UNSIGNED ] }
{ BINARY 32 [ , scale ] ] [ UNSIGNED ] }
{ BINARY 64 [ , scale ] }
{ }
{ FLOAT [ 32 ] }
{ FLOAT 64 }
{ }
{ COMPLEX }
{ }
{ LOGICAL 1 }
{ LOGICAL [ 2 ] }
{ LOGICAL 4 }
{ }
{ ENUM }
{ }
{ SQL VARCHAR length }
{ SQL DATETIME [ start-date-time TO ] end-date-time }
{ SQL DATE }
{ SQL TIME }
{ SQL TIMESTAMP }
{ SQL INTERVAL start-date-time }
{ [ start-field-precision ] [ TO end-date-time ] }
{ }
{ BIT bit-length [ UNSIGNED ] [ ENUM enum-name ] }