ROW data type, Unnamed

An unnamed ROW type contains fields but has no user-declared name. An unnamed ROW type is defined by its structure.

Two unnamed ROW types are equal if they have the same structure (meaning the ordered list of the data types of the fields). If two unnamed ROW types have the same number of fields, and if the order of the data type of each field in one ROW type matches the order of data types of the corresponding fields in the other ROW data type, then the two unnamed ROW data types are equal.

For example, the following unnamed ROW types are equal:
ROW (lname char(15), initial char(1) fname char(15))
ROW (dept char(15), rating char(1) name char(15))
The following ROW types have the same number of fields and the same data types, but are not equal, because their fields are not in the same order:
ROW (x integer, y varchar(20), z real)
ROW (x integer, z real, y varchar(20))
A field of an unnamed ROW type can be any of the following data types:
  • A built-in type
  • A collection type
  • A distinct type
  • Another ROW type
  • An opaque type

Unnamed ROW types cannot be used in typed tables or in type inheritance hierarchies. For more information about unnamed ROW types, see the HCL OneDB™ Guide to SQL: Syntax and the HCL OneDB Database Design and Implementation Guide.