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 ]- The type name can be one of the primitive data types.
- The type can also reference a table column in the database schema file.
- dbname identifies a specific database schema file.
- tabname.colname references a column defined in the database schema file.
- 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
Primitive types can be used in:
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