code: public boolean tableContainsColumn (Connection conn, String table, String column)
          throws SQLException
      {
          ResultSet rs = conn.getMetaData().getColumns(null, null, table, column);
          while (rs.next()) {
              String tname = rs.getString("TABLE_NAME");
              String cname = rs.getString("COLUMN_NAME");
              if (tname.equals(table) && cname.equals(column)) {
                  return true;
              }
          }
          return false;
      }
docs: from DatabaseLiaison