public boolean hasColumn(ResultSetMetaData rsMetaData,String columnName) throws SQLException {
  for (int colPos=1; colPos <= rsMetaData.getColumnCount(); colPos++) {
    if (columnName.equalsIgnoreCase(rsMetaData.getColumnName(colPos))) {
      return true;
    }
  }
  return false;
}

public boolean hasColumn ( ResultSetMetaData rsMetaData , String columnName ) throws SQLException { for ( int colPos = 1 ; colPos <= rsMetaData . getColumnCount ( ) ; colPos ++ ) { if ( columnName . equalsIgnoreCase ( rsMetaData . getColumnName ( colPos ) ) ) { return true ; } } return false ; }
whether a result set contains a given column
