-
Type Schema
-
Type name
-
Source data type
-
Length
-
LOB unit
-
Precision
-
Scale
-
Bit data
-
Comment
-
OK
-
Cancel
-
Show SQL

Type schema
Use this box to specify the schema of the distinct type that you're
creating. The initial value in this box is the user ID under which you
connected to the database. To specify a schema with a name that's
different than this ID, use one of these methods:
- Click on the down arrow to display a list of existing schemas and select
one.
- Type the name of the schema that you want. The schema can be an
existing one or, if you have IMPLICIT_SCHEMA authority, it can be a new
one. This name:
Type name
Enter a name for the distinct type that you're creating. This
name:
- Can contain up to 18 characters, including letters, numbers, at signs (@),
pound signs (#), dollar signs ($), and underscores (_)
- Must begin with a letter (A-Z)
- Can be an ordinary or delimited identifier
- Must not be the same as any of the keywords in predicates reserved for
system use (SOME, ANY, ALL, NOT, AND, OR, BETWEEN, NULL, LIKE, EXISTS, IN,
UNIQUE, OVERLAPS, SIMILAR, MATCH) or comparison operators (=, <>, <,
<=, >, >=).
Attention: This name must be unique within the distinct
type's schema. No other object in the schema can have the same
name as the distinct type.
Source Data type
Use this box to specify the data type of the distinct type that you're
creating. To specify the data type, click on the down arrow to display
a list of data types and select one.
The data type can be one of:
- Integer
- For a large integer with a precision of 11 digits.
- Smallint
- For a small integer with a precision of 5 digits.
- Bigint
- For a large integer with a precision of 19 digits.
- Double
- For a floating-point number. Double Precision and Float are
synonyms for Double.
- Decimal
- For a decimal number.
- Character
- For a fixed-length character string.
- Varchar
- For a varying-length character string with a maximum length of
4000.
- Long Varchar
- For a varying-length character string with a maximum length of
32700.
- BLOB
- For a binary large object string.
- CLOB
- For a character large object string.
- DBCLOB
- For a varying-length graphic string with a maximum length of 1,073,741,823
double-byte characters.
- Graphic
- For a fixed-length graphic string of double-byte characters.
- Vargraphic
- For a varying-length graphic string with a maximum length of 2,000
double-byte characters.
- Long Vargraphic
- For a varying-length graphic string with a maximum length of 16,350
double-byte characters.
- Date
- For a date.
- Time
- For a time.
- Timestamp
- For a timestamp.
- Real
- For a single-precision floating-point number.
Length
Use this field to specify the length (byte count) of the distinct type
based on the specified data type:
- Character
- Length of the fixed-length character string, which can range from 1 to
254.
- Varchar
- Maximum length of the varying-length character string, which can range
from 1 to 4000.
- BLOB
- Maximum length of the BLOB string, which can range from 1 to
2147483647. If a LOB unit of Kbytes, Mbytes, or Gbytes is specified in
the LOB unit box, the maximum value of Length is limited
as follows:
- Kbytes
- The maximum value for this field is 2097152. Each KB is equivalent
to 1024 bytes, so the maximum length in bytes is 1024 times the integer value
you specify in this field.
- Mbytes
- The maximum value for this field is 2048. Each MB is equivalent to
1048576 bytes, so the maximum length in bytes is 1048576 times the integer
value you specify in this field.
- Gbytes
- The maximum value for this field is 2. Each GB is equivalent to
1073741824 bytes, so the maximum length in bytes is 1073741824 times the
integer value you specify in this field.
- CLOB
- Maximum length of the CLOB string, which can range from 1 to
2147483647. If a LOB unit of Kbytes, Mbytes, or Gbytes is specified in
the LOB unit box, the maximum value of Length is limited
as follows:
- Kbytes
- The maximum value for this field is 2097152. Each KB is equivalent
to 1024 bytes, so the maximum length in bytes is 1024 times the integer value
you specify in this field.
- Mbytes
- The maximum value for this field is 2048. Each MB is equivalent to
1048576 bytes, so the maximum length in bytes is 1048576 times the integer
value you specify in this field.
- Gbytes
- The maximum value for this field is 2. Each GB is equivalent to
1073741824 bytes, so the maximum length in bytes is 1073741824 times the
integer value you specify in this field.
- DCLOB
- Maximum length of the DCLOB string, which can range from 1 to 1073741823
double-byte characters. If a LOB unit of Kbytes, Mbytes, or Gbytes is
specified in the LOB unit box, the maximum value of
Length is limited as follows:
- Kbytes
- The maximum value for this field is 1048576. Each KB is equivalent
to 1024 bytes, so the maximum length in double bytes is 1024 times the integer
value you specify in this field.
- Mbytes
- The maximum value for this field is 1024. Each MB is equivalent to
1048576 bytes, so the maximum length in double bytes is 1048576 times the
integer value you specify in this field.
- Gbytes
- The maximum value for this field is 1. Each GB is equivalent to
1073741824 bytes, so the maximum length in double bytes is 1073741824 times
the integer value you specify in this field.
- Graphic
- Length of the fixed-length graphic string, which can range from 1 to
127. If the length is not specified, a length of 1 is assumed.
- Vargraphic
- Maximum length of the varying-length graphic string, which can range from
1 to 2000.
LOB unit
Use this box to specify a multiplier for the length of distinct types of
data type BLOB, CLOB, or DBCLOB. If you specify a LOB unit of:
- Kbytes
- The maximum length is 1024 times the value specified in the
Length box. The maximum value of Length is
2097152 for BLOB or CLOB data. For DBCLOB data, the maximum value is
1048576 because a DBCLOB string is in double-byte characters.
- Mbytes
- The maximum length is 1048576 times the value specified in the
Length box. The maximum value of Length is 2048
for BLOB or CLOB data. For DBCLOB data, the maximum value is 1024
because a DBCLOB string is in double-byte characters.
- Gbytes
- The maximum length is 1073741824 times the value specified in the
Length box. The maximum value of Length is 2 for
BLOB or CLOB data. For DBCLOB data, the maximum value is 1 because a
DBCLOB string is in double-byte characters.
This box is available only if you specified BLOB, CLOB, or DBCLOB in the
Source data type box.
Precision
Use this field to specify the precision of a decimal number. The
precision is the total number of digits, which can range from 1 to 31.
If you do not specify the precision, a default value of 5 is used.
This field is available only if you specified DECIMAL in the Source
data type box.
Scale
Use this field to specify the scale of a decimal number. The scale
is the number of digits to the right of the decimal point, which can range
from 0 to the precision of the number. If you do not specify the scale,
a default value of 0 is used.
This field is available only if you specified DECIMAL in the Source
data type box.
Bit data
Select this check box if you want the contents of the distinct type to be
treated as bit (binary) data. During data exchange with other systems,
code page conversions are not performed. Comparisons are done in
binary, irrespective of the database collating sequence.
This field is available only if you specified a data type of CHARACTER,
VARCHAR, or LONG VARCHAR in the Source data type box.
Comment
Optional: Type a comment to document the distinct type that
you're creating. You can type up to 254 characters, including
embedded blanks.