This is the syntax to define a column as a named or unnamed ROW type.
Row Data Types: |--+-+---------------------+--row_type-+------------------------| | | (1) | | | '-| Owner Name |------' | | (2) | '-| Unnamed Row Types |-------------' Unnamed Row Types: |--ROW--+----------------------------+--------------------------| | .-,----------------. | | V | | '-(----field--data_type-+--)-'
Element | Description | Restrictions | Syntax |
---|---|---|---|
data_type | Data type of field | Any data type except BYTE or TEXT | Data Type |
field | Name of a field within row_type | Must be unique among fields of the same ROW type | Identifier |
row_type | Some ROW data type defined by CREATE ROW TYPE statement | ROW type must exist in the database | Identifier;
Data Type |
You can assign a named ROW type to a table, to a column, or to an SPL variable. A named ROW type that you use to create a typed table or to define a column must already exist. For information on how to create a named ROW data type, see CREATE ROW TYPE .
To specify a named ROW data type in an ANSI-compliant database, you must qualify the row_type with its owner name, if you are not the owner of row_type.
An unnamed ROW data type is identified by its structure, which specifies fields that you create with its ROW constructor. You can define a column or an SPL variable as an unnamed ROW data type. For the syntax to specify values for an unnamed ROW type, see ROW Constructors.
Enterprise Edition Home | Express Edition Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]