In this example, suppose you are writing applications that need to handle different currencies and want to ensure that DB2® does not allow these currencies to be compared or manipulated directly with one another in queries.
CREATE DISTINCT TYPE US_DOLLAR AS DECIMAL (9,2) CREATE DISTINCT TYPE CANADIAN_DOLLAR AS DECIMAL (9,2) CREATE DISTINCT TYPE EURO AS DECIMAL (9,2)