org.h2.util

## Class MergedResultSet

- java.lang.Object
- - org.h2.util.MergedResultSet

    public final class MergedResultSet
    extends java.lang.Object

Merged result set. Used to combine several result sets into one. Merged result set will contain rows from all appended result sets. Result sets are not required to have the same lists of columns, but required to have compatible column definitions, for example, if one result set has a `Types.VARCHAR` column `NAME` then another results sets that have `NAME` column should also define it with the same type.

### Constructor Summary

Constructors
Constructor and Description
`MergedResultSet()`

### Method Summary

Methods
`void` `add(java.sql.ResultSet rs)` Appends a result set.
`SimpleResultSet` `getResult()` Returns merged results set.
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### MergedResultSet

    public MergedResultSet()

### Method Detail

#### add

    public void add(java.sql.ResultSet rs)
             throws java.sql.SQLException

Appends a result set.

Parameters:
  `rs` - result set to append
Throws:
  `java.sql.SQLException` - on SQL exception

#### getResult

    public SimpleResultSet getResult()

Returns merged results set.

Returns:
  result set with rows from all appended result sets

#### toString

    public java.lang.String toString()

Overrides:
  `toString` in class `java.lang.Object`