Distinct Types -- Working With

  • Creating a distinct type
  • Granting and revoking user-defined data type (UDT) privileges

  • Distinct types are also known as user-defined types. They are new objects in DB2 for OS/390 Version 6. A distinct type must be sourced on one of the DB2 built-in types. A distinct type can be useful when you need a table column to hold data of a particular type. For example, you might want a table that contains data on sales in different states and have a column for the zip codes where the sales are made. You could define a distinct type called ZIP that would be based on the built-in CHARACTER type with a length of 5, since zip codes are five digits long.