User‑Defined Data Type, ARRAY Data Type, and VARRAY Data Type Limits
Parameter |
Value |
Maximum structured UDT size. This value is based on a table having a 1 byte (BYTEINT) primary index. Because a UDT column cannot be part of any index definition, there must be at least one non‑UDT column in the table for its primary index. Row header overhead consumes 14 bytes in an NPPI table and 16 bytes in a PPI table, so the maximum structured UDT size is derived by subtracting 15 bytes (for an NPPI table) or 17 bytes (for a PPI table) from the row maximum of 64,256 bytes. |
|
Maximum number of UDT columns per base data table. The absolute limit is 2,048, and the realizable number varies as a function of the number of other features declared for a table that occupy table header space. The figure of 1,600 UDT columns assumes a FAT table header. This limit is true whether the UDT is a distinct or a structured type. |
~1,600 |
Maximum database, user, base table, view, macro, index, trigger, procedure, UDF, UDM, UDT, constraint, or column name size. Other rules apply for Japanese character sets, which might restrict names to fewer than 30 bytes. See SQL Fundamentals for the applicable rules. |
30 bytes in Latin or Kanji1 internal representation |
Maximum number of attributes that can be specified for a structured UDT per CREATE TYPE or ALTER TYPE request. The maximum is platform‑dependent, not absolute. |
300 - 512 |
Maximum number of attributes that can be defined for a structured UDT. While you can specify no more than 300 to 512 attributes for a structured UDT per CREATE TYPE or ALTER TYPE request, you can submit any number of ALTER TYPE requests with the ADD ATTRIBUTE option specified as necessary to add additional attributes to the type up to the upper limit of approximately 4,000. |
~4,000 |
Maximum number of levels of nesting of attributes that can be specified for a structured UDT. |
512 |
Maximum number of methods associated with a UDT. There is no absolute limit on the number of methods that can be associated with a given UDT. Methods can have a variable number of parameters, and the number of parameters directly affects the limit, which is due to Parser memory restrictions. There is a workaround for this issue. See “ALTER TYPE” in SQL Data Definition Language Detailed Topics for details. |
~500 |
Maximum number of input parameters with a UDT data type of VARIANT_TYPE that can be declared for a UDF definition. |
8 |
Minimum number of dimensions that can be specified for a multidimensional ARRAY or VARRAY data type. |
2 |
Maximum number of dimensions that can be specified for a multidimensional ARRAY or VARRAY data type. |
5 |