Having rs, an instance of java.sql.ResultSet, how to check that it contains a column named \"theColumn\"?
rs
Try using the method ResultSet#findColumn(String)
private boolean isThere(ResultSet rs, String column) { try { rs.findColumn(column); return true; } catch (SQLException sqlex) { logger.debug("column doesn't exist {}", column); } return false; }