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 - com.ibm.db2.app.Clob
BLOB - com.ibm.db2.app.Blob
DBCLOB - com.ibm.db2.app.Clob
DataLink - -
Related concepts
Java stored procedures
Java user-defined scalar functions
SQLJ procedures that manipulate JAR files
Related tasks
Use Java SQL routines