Create Distinct Type -- Fields and controls

Source data type
Length



Source data type

Use this box to specify the DB2 built-in data type to be used as the source data type for the distinct type. The data type can be one of:

INTEGER
For a large integer.
SMALLINT
For a small integer.
DECIMAL
For a decimal number.
REAL
For a single-precision floating-point number.
DOUBLE
For a double-precision floating-point number.
CHARACTER
For a fixed-length character string.
VARCHAR
For a varying-length character string.
GRAPHIC
For a fixed-length graphic string.
VARGRAPHIC
For a varying-length graphic string.
CLOB
For a character large object string. A CLOB column has a varying length and is a long string column regardless of its length.
BLOB
For a binary large object. A BLOB column has a varying length and is a long string column regardless of its length.
DBCLOB
For a double-byte character large object string of the specified maximum length in double-byte characters. A DBCLOB column has a varying length and is a long string column regardless of length.
DATE
For a date.
TIME
For a time.
TIMESTAMP
For a timestamp.
ROWID
For a row ID type. A table can have only one ROWID column. The values in a ROWID column are unique for every row in the table and cannot be updated. DB2 implicitly defines a ROWID column as NOT NULL.

Length

Use this field to specify the length (byte count) of the columns based on the specified data type:

CHARACTER
Length of the fixed-length character string, which can range from 1 to 255. The default is 1.
VARCHAR
Maximum length of the varying-length character string, which can range from 1 to the maximum record size minus 8 bytes.

The maximum record size depends on the page size of the table space (the size of its buffer) where this distinct type will be used and whether an edit procedure is specified for the table where this distinct type will be used. The maximum record size when there's no edit procedure on the table is:

and when there is an edit procedure on the table: Therefore, the maximum VARCHAR length that you can specify when there is not an edit procedure is: and when there is an edit procedure, the maximum VARCHAR length is:
GRAPHIC
Length of the fixed-length graphic string, which can range from 1 to 127. The default is 1.
VARGRAPHIC
Maximum length of the varying-length graphic string, which can range from 1 to N/2, where N is the maximum row size minus 2 bytes.
CLOB
Length of the character large object string. The value that you can type in this field for a CLOB can range from:

If you specify a value that evaluates to 2 GB (2 147 483 648 bytes), DB2 uses a value that is one byte less (2 147 483 647 bytes).

BLOB
Length of the binary large object string. The range of the value you can type in this field for a BLOB is the same as for a CLOB.
DBCLOB
Length of the double-byte character large object string. the value you can type in this field for a DBCLOB can range from: