code: public static boolean hasField(Connection connection, String tableName, String fieldName) throws SQLException {
          final Statement statement = connection.createStatement();
          try {
              final ResultSet resultSet = statement.executeQuery(
                      "SELECT * FROM " + TableLocation.parse(tableName) + " LIMIT 0;");
              try {
                  return hasField(resultSet.getMetaData(), fieldName);
              } finally {
                  resultSet.close();
              }
          } catch (SQLException ex) {
              return false;
          } finally {
              statement.close();
          }
      }
docs: Return true if table tableName contains field fieldName.
  
  @param connection Connection
  @param tableName  Table name
  @param fieldName  Field name
  @return True if the table contains the field
  @throws SQLException