IBM Books

Call Level Interface Guide and Reference


Using User Defined Types (UDT)

In addition to the SQL data types (referred to as base SQL data types) defined in "Data Types and Data Conversion", new distinct types can be defined by the user. These user defined types (UDTs) share its internal representation with an existing type, but is considered to be a separate and incompatible type for most operations. These UDTs are created using the CREATE DISTINCT TYPE SQL statement.

UDTs help provide the strong typing control needed in object oriented programming by ensuring that only those functions and operators explicitly defined on a distinct type can be applied to its instances. Applications continue to work with C data types for application variables, and only need to consider the UDT types when constructing SQL statements.

This means:

For complete rules and a description of user defined types(UDT) refer to the SQL Reference.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]