Db2 Limits in Db2 12

Db2 Limits in Db2 12

(This article is part of our Db2 Guide. Use the right-hand menu to navigate.)

Identifier length limits

Item Limit
External-java-routine-name 1305 bytes
Name of an alias, auxiliary table, collection, clone table, constraint, correlation, cursor (except for DECLARE CURSOR WITH RETURN or the EXEC SQL utility), distinct type (both parts of two-part name), host identifier, index, JARs, parameter, procedure, role, schema, sequence, specific, statement, storage group, savepoint, SQL condition, SQL label, SQL parameter, SQL variable, synonym, table, trigger, view, XML attribute name, XML element name 128 bytes
Name of an authid or name of a security label 8 bytes
Routine version identifier 64 EBCDIC bytes, and UTF-8 representation of the name must not exceed 122 bytes
Name of a column 30 bytes
Name of a cursor that is created with DECLARE CURSOR WITH RETURN 30 bytes
Name of a cursor created with EXEC SQL utility 8 bytes
Name of a location 16 bytes
Name of buffer pool name, catalog, database, plan, program, table space 8 bytes
Name of package 8 bytes (only 8 EBCDIC characters are used for packages that are created with the BIND PACKAGE command. 128 bytes can be used for packages that are created as a result of the CREATE FUNCTION (SQL scalar) statement, the CREATE PROCEDURE (SQL-native) statement, the CREATE TRIGGER statement, or a BIND command that specifies a zFS file as DBRM library.)
Name of a profile created with CREATE/ALTER TRUSTED CONTEXT 127 bytes

Numeric Limits

Item Limit
Smallest SMALLINT value -32768
Largest SMALLINT value 32767
Smallest INTEGER value -2147483648
Largest INTEGER value 2147483647
Smallest BIGINT value -9223372036854775808
Largest BIGINT value 9223372036854775807
Smallest REAL value About -7.2*10(75)
Largest REAL value About 7.2*10(75)
Smallest positive REAL value About 5.4*10(-79)
Largest negative REAL value About -5.4*10(-79)
Smallest FLOAT value About -7.2*10(75)
Largest FLOAT value About 7.2*10(75)
Smallest positive FLOAT value About 5.4*10(-79)
Largest negative FLOAT value About -5.4*10(-79)
Smallest DECIMAL value 1 – 10(31)
Largest DECIMAL value 10(31) – 1
Largest DECIMAL precision 31
Smallest DECFLOAT(16) value -9.999999999999999×10384
Largest DECFLOAT(16) value 9.999999999999999×10384
Smallest positive DECFLOAT(16) value 1.000000000000000×10-383
Largest negative DECFLOAT(16) value -1.0000000000000000×10-383
Smallest DECFLOAT(34) value -9999999999999999999999999999×10-6144
Largest DECFLOAT(34 value 9.99999999999999999999999999×10-6144
Smallest positive DECFLOAT(34) value 1.00000000000000000000000000×10-6143
Largest negative DECFLOAT(34) value -1.00000000000000000000000000×10-6143
Coefficient length for DECFLOAT values DECFLOAT(16) 16 digits; DECFLOAT(34) 34 digits
Max Exponent (Emax) for DECFLOAT DECFLOAT(16) is 384; DECFLOAT(34) is 6144
Min Exponent (Emin) for DECFLOAT DECFLOAT(16) is -383; DECFLOAT(34) is -6143
Bias for DECFLOAT values DECFLOAT(16) is 398; DECFLOAT(34) is 6176
Maya Lin-Takahashi
Author

Maya Lin-Takahashi

Maya is a hardware enthusiast who tests and reviews smart home devices, smartphones, wearables, and audio gear. She focuses on practical consumer value and build quality.