User defined data types like user define functions are creating customised data types.
For example, CREATE DISTINCT TYPE AUDIO AS BLOB(1M);
So now the “audio” becomes a new data-type.
If we talk about user defined data types, there are 2 types.
Distinct type:In this case only user defined type is customised based on existing type
CREATE TYPE PERSON_DET AS (NAME CHAR(20),
REF USING VARCAHR(13) FOR BIT DATA
MODE DB2 SQL;
The basic difference is , we can create a structure with mix of db2 existing types and UDTs.
The usage for UDTs we can see in the Banking domain.
In my next posts I will add more explanation.