The bigint data type bigint correctly to BigInteger , as it says: it is a large integer that may not fit into Long.
You can use resultSet.get(columnPos) and then check the class of the returned object.
We wrote a utility class for this, so we would do something like this:
public Long getLongFromResultSet( ResultSet rs, int columnPos ) { Object value = rs.get( columnPos ); if( value instanceof Number) {
source share