Cast between other data types
- Opaque data types
You can create casts to convert a UDT to other data types in the database. Developers of opaque data types must also provide functions that serve as cast functions between the internal and external representations of the opaque type. For more information, see Create an opaque data type.
- Distinct data types
The database server cannot directly compare a distinct type to its source type. However, the database server automatically registers explicit casts from the distinct type to the source type and conversely. Although a distinct type inherits the casts and functions of its source type, the casts and functions that you define on a distinct type are not available to its source type.
- Named row types
You can create casts to convert a named row data type to another type. For information about how to cast between named row types and unnamed row types, see the HCL OneDB™ Guide to SQL: Tutorial.
For more information about how to create and register casts on extended data types, refer to Create user-defined casts.