code: public synchronized ResultSet executeQuery(
              String sql) throws SQLException {
  
          fetchResult(sql, StatementTypes.RETURN_RESULT,
                      JDBCStatementBase.NO_GENERATED_KEYS, null, null);
  
          return getResultSet();
      }
docs: <!-- start generic documentation -->
  Executes the given SQL statement, which returns a single
  <code>ResultSet</code> object.
  <!-- end generic documentation -->
  
  <!-- start release-specific documentation -->
  <div class="ReleaseSpecificDocumentation">
  <h3>HSQLDB-Specific Information:</h3> <p>
  
  This method should not be used for statements other than SELECT queries.<p>
  
  From 1.9.0, HSQLDB throws an exception when the statement
  is a DDL statement or an UPDATE or DELETE statement.
  </div>
  <!-- end release-specific documentation -->
  
  @param sql an SQL statement to be sent to the database, typically a
  static SQL <code>SELECT</code> statement
  @return a <code>ResultSet</code> object that contains the data produced
  by the given query; never <code>null</code>
  @exception SQLException if a database access error occurs,
  this method is called on a closed <code>Statement</code> or the given
  SQL statement produces anything other than a single
  <code>ResultSet</code> object