ovreddy Member
Joined: 07 Oct 2006 Posts: 14 Location: Chennai

0 votes 


0 salutes 

Posted: Wed Oct 11, 2006 5:58 pm Post subject: 


Hi Jack,
A stored procedure parameter is also a DB2 Data Type. So the size limit will be same as normal DB2 data types. The following is the summary of data types in DB2.
CHAR[(n)] [FOR BIT DATA]
CHARACTER[(n)] [FOR BIT DATA] 1 to 254 characters
VARCHAR(n) [FOR BIT DATA]
CHARACTER VARYING(n) [FOR BIT DATA]
CHAR VARYING(n) [FOR BIT DATA]
A variablelength character string. The range of n is 1 to 32 672 characters.
LONG VARCHAR [FOR BIT DATA]
A variablelength character string. The maximum length is 32 700 characters.
GRAPHIC[(n)]
A fixedlength graphic string. The range of n is 1 to 127 doublebyte characters. When n is not cpecified the default value is 1.
VARGRAPHIC(n)
A variablelength graphic string. The range of n is 1 to 16 336 doublebyte characters.
LONG VARGRAPHIC
A variablelength graphic string. The maximum length is 16 350 doublebyte characters
BIGINT
An 8byte integer with a precision of 19 digits. The range of big integers is 9 223 372 036 854 775 808 to +9 223 372 036 854 775 807.
INTEGER
INT
A 4byte integer with a precision of 10 digits. The range of large integers is 2 147 483 648 to +2 147 483 647.
SMALLINT
A 2byte integer with a precision of 5 digits. The range is 32 768 to 32 767.
DECIMAL[(p[,s])]
DEC[(p[,s])]
NUMERIC[(p[,s])]
NUM[(p[,s])]
A packed decimal number with an implicit decimal point. The position of the decimal point is determined by the precision (p) and the scale (s) of the number.
The p specifies the total number of the digits. The range of the precision is 1 to 31 digits.
The s is the number of digits in the fractional part of the number. It cannot be negative or greater than the precision. The range of scale is 0 to the precision of the number.
If p is omitted, the default is 5.
If s is omitted the default is 0, that is, values will have no decimal point or fractional part.
The range of a decimal variable or the numbers in a decimal column is n to +n, where the absolute value of n is the largest number that can be represented with the applicable precision and scale. The maximum range is 10^31+1 to 10^311.
FLOAT, REAL and DOUBLE
FLOAT[(n)]
FLOAT data type is used to store singleprecision and doubleprecision floatingpoint numbers.
A singleprecision floatingpoint number is a 32bit approximation of a real number. The number can be zero or can range from 3.402E+38 to 1.175E37, or from 1.175E37 to 3.402E+38. The range of n is 1 to 24. IBM DB2 internally represents the singleprecision FLOAT data type as the REAL data type.
A doubleprecision floatingpoint number is a 64bit approximation of a real number. The number can be zero or can range from 1.79769E+308 to 2.225E307, or from 2.225E307 to 1.79769E+308. The range of n is 25 to 53. IBM DB2 internally represents thedoubleprecision FLOAT data type as the DOUBLE [PRECISION] data type.
If n is not specified the default value is 53.
REAL
A singleprecision floatingpoint number.
DOUBLE [PRECISION]
A doubleprecision floatingpoint number
DATE, TIME and TIMESTAMP
DATE
The DATE data type stores the date information (year, month, day). The supported range is January 1, 0001 to December 31, 9999.
TIME
The TIME data type stores the time information (hours, minutes, seconds). The supported range is 00 hours 00 minutes 00 seconds to 24 hours 00 minutes 00 seconds.
If the hour is 24, the minute and second specifications are zero.
TIMESTAMP
The TIMESTAMP data type stores the date and time information (year, month, day, hour, minute, second, and microsecond). The supported range is January 1, 0001 00 hours 00 minutes 00 seconds 000000 microseconds to December 31, 9999 24 hours 00 minutes 00 seconds 000000 microseconds
BLOB, CLOB and DBCLOB
BLOB(n[KMG])
A BLOB (binary large object) is a variablelength binary string that can be up to 2 gigabytes (2 147 483 647 bytes) long.
If only n by itself is specified, the value of n is the maximum length. If K, M or G is specified the maximum length is 1 024, 1 048 576 or 1 073 741 824 times n, and the maximum value for n is 2 097 152, 2 048 or 2, respectively.
Binary large objects are used to hold data, such as pictures, video and audio. Like FOR BIT DATA character strings, BLOB strings are not associated with a code page.
CLOB(n[KMG])
A CLOB (character large object) is a variablelength character string that can be up to 2 gigabytes (2 147 483 647 bytes) long. If the length is zero, the value is called the empty string. This value should not be confused with the null value.
If only n by itself is specified, the value of n is the maximum length. If K, M or G is specified the maximum length is 1 024, 1 048 576 or 1 073 741 824 times n, and the maximum value for n is 2 097 152, 2 048 or 2, respectively.
Character large objects are used to store large SBCS's (singlebyte character sets) characterbased data such as formatted text, HTML and XML documents.
DBCLOB(n[KMG])
A DBCLOB (doublebyte character large object) is a variablelength graphic string of doublebyte characters that can be up to 1 073 741 823 characters long.
If only n by itself is specified, the value of n is the maximum length. If K, M or G is specified the maximum length is 1 024, 1 048 576 or 1 073 741 824 times n, and the maximum value for n is 1 048 576, 1 024 or 1, respectively.
Doublebyte character large objects are used to store large DBCS's (doublebyte character sets) characterbased data.
DATALINK
A DATALINK value is a character string, which references an object stored external to a database. The DATALINK values encode the file and the filename in terms of a Uniform Resource Locator (URL).
A URL is a text string of the general format:
Thanks,
Reddy 
