Parameter passing conventions for Java stored procedures and UDFs

The following table lists how SQL data types are represented in Java™ stored procedures and UDFs.

SQL data type Java parameter style JAVA Java parameter style DB2GENERAL
SMALLINT short short
INTEGER int int
BIGINT long long
DECIMAL(p,s) BigDecimal BigDecimal
NUMERIC(p,s) BigDecimal BigDecimal
REAL or FLOAT(p) float float
DOUBLE PRECISION or FLOAT or FLOAT(p) double double
CHARACTER(n) String String
CHARACTER(n) FOR BIT DATA byte[] com.ibm.db2.app.Blob
VARCHAR(n) String String
VARCHAR(n) FOR BIT DATA byte[] com.ibm.db2.app.Blob
GRAPHIC(n) String String
VARGRAPHIC(n) String String
DATE Date String
TIME Time String
TIMESTAMP Timestamp String
Indicator Variable - -
CLOB Start of changejava.sql.ClobEnd of change com.ibm.db2.app.Clob
BLOB Start of changejava.sql.BlobEnd of change com.ibm.db2.app.Blob
DBCLOB Start of changejava.sql.ClobEnd of change com.ibm.db2.app.Clob
DataLink - -
Start of changeARRAYEnd of change Start of changejava.sql.ArrayEnd of change Start of change-End of change