!--a11y-->
Type
Conversions Supported by ResultSet Getter
Methods 
The java.sql.ResultSet interface provides getter methods for retrieving column values from the row where the cursor is currently positioned. The method names follow the pattern "get<Type>". The recommended getter methods for each supported JDBC type is shown in the following Table (upper-case X). The table also shows all possible type conversions that Open SQL supports (lower-case x). The invocation of a non-supported (that is, not marked) getter method causes an SQL exception.
Use of ResultSet getter methods
Type/get<Type>() |
Object |
String |
Boolean |
Bytes |
Byte |
Short |
Int |
Long |
Float |
Double |
BigDecimal |
Date |
Time |
Timestamp |
CharacterStream |
BinaryStream |
Clob |
Blob |
VARCHAR |
x |
X |
|
|
|
|
|
|
|
|
|
|
|
|
x |
|
|
|
LONGVARCHAR |
x |
X |
|
|
|
|
|
|
|
|
|
|
|
|
x |
|
|
|
CLOB |
x |
x |
|
|
|
|
|
|
|
|
|
|
|
|
x |
|
X |
|
VARBINARY |
x |
|
|
X |
|
|
|
|
|
|
|
|
|
|
|
x |
|
|
LONGVARBINARY |
x |
|
|
X |
|
|
|
|
|
|
|
|
|
|
|
x |
|
|
BLOB |
x |
|
|
x |
|
|
|
|
|
|
|
|
|
|
|
x |
|
X |
SMALLINT |
x |
|
|
|
|
X |
x |
x |
x |
x |
x |
|
|
|
|
|
|
|
INTEGER |
x |
|
|
|
|
|
X |
x |
x |
x |
x |
|
|
|
|
|
|
|
BIGINT |
x |
|
|
|
|
|
|
X |
x |
x |
x |
|
|
|
|
|
|
|
REAL |
x |
|
|
|
|
|
|
|
X |
x |
x |
|
|
|
|
|
|
|
DOUBLE |
x |
|
|
|
|
|
|
|
|
X |
x |
|
|
|
|
|
|
|
DECIMAL(P[,S]) |
x |
|
|
|
|
|
|
|
|
|
X |
|
|
|
|
|
|
|
DATE |
x |
|
|
|
|
|
|
|
|
|
|
X |
|
|
|
|
|
|
TIME |
x |
|
|
|
|
|
|
|
|
|
|
|
X |
|
|
|
|
|
TIMESTAMP |
x |
|
|
|
|
|
|
|
|
|
|
|
|
X |
|
|
|
|
CHAR |
x |
X |
|
|
|
|
|
|
|
|
|
|
|
|
x |
|
|
|
BINARY |
x |
|
|
X |
|
|
|
|
|
|
|
|
|
|
|
x |
|
|
FLOAT |
x |
|
|
|
|
|
|
|
|
X |
x |
|
|
|
|
|
|
|
NUMERIC |
x |
|
|
|
|
|
|
|
|
|
X |
|
|
|
|
|
|
|
BIT |
x |
|
X |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
