Primitive type specification

Type definitions using a primitive data type define a primitive type.

Syntax

A primitive-type-specification is:
{ BOOLEAN
| CHAR(size)
| VARCHAR(size)
| STRING
| BIGINT
| INTEGER
| SMALLINT
| TINYINT
| DECIMAL(prec [,scale])
| MONEY(prec [,scale])
| FLOAT | SMALLFLOAT
| DATE
| DATETIME qual1 TO qual2
| INTERVAL qual1 TO qual2 
| TEXT
| BYTE
| LIKE [dbname:]tabname.colname
}
   [ attributes-list ]
  1. The type name can be one of the primitive data types.
  2. The type can also reference a table column in the database schema file.
  3. dbname identifies a specific database schema file.
  4. tabname.colname references a column defined in the database schema file.
  5. attributes-list is a comma-separated list of name = value pairs or name attributes, and defines attributes for the element of this primitive type.

Usage

Example

DEFINE cnt INTEGER
DEFINE filename STRING
TYPE t_cust RECORD
        cust_id LIKE customer.cust_id,
        cust_id LIKE customer.cust_name
    END RECORD