Reference - JDBC Data Types v42.2.19.1

Edit this page

The following table lists the JDBC data types supported by Advanced Server and the JDBC connector. If you are binding to an Advanced Server type (shown in the middle column) using the setObject() method, supply a JDBC value of the type shown in the left column. When you retrieve data, the getObject() method will return the object type listed in the right-most column:

JDBC TypeAdvanced Server TypegetObject() returns
INTEGERINT4java.lang.Integer
TINYINT, SMALLINTINT2java.lang.Integer
BIGINTINT8java.lang.Long
REALFLOAT4java.lang.Float
DOUBLE, FLOATFLOAT8java.lang.Double (Float is same as double)
DECIMAL, NUMERICNUMERICjava.math.BigDecimal
CHARBPCHARjava.lang.String
VARCHAR, LONGVARCHARVARCHARjava.lang.String
DATEDATEjava.sql.Date
TIMETIME, TIMETZjava.sql.Timestamp
TIMESTAMPTIMESTAMP, TIMESTAMPTZjava.sql.Timestamp
BINARYBYTEAbyte[](primitive)
BOOLEAN, BITBOOLjava.lang.Boolean
Types.REFREFCURSORjava.sql.ResultSet
Types.REF_CURSORREFCURSORjava.sql.ResultSet
Types.OTHERREFCURSORjava.sql.ResultSet
Types.OTHERUUIDjava.util.UUID
Types.SQLXMLXMLjava.sql.SQLXML
Note

Types.REF_CURSOR is only supported for JRE 4.2.

Types.OTHER is not only used for UUID, but is also used if you do not specify any specific type and allow the server or the JDBC driver to determine the type. If the parameter is an instance of java.util.UUID, the driver determines the appropriate internal type and sends it to the server.