union

Merges the results of the subquery. It does not guarantee the output order, because union is executed in parallel with other queries. As with running statistical processing, this is primarily used when high performance is required and the order is not important.

Syntax

union [ SUBQUERY ]
Required Parameter
[ SUBQUERY ]
Subquery that returns the data to be combined with the input data, enclosed in a pair of square brackets ([ ]).

Usage

Merge SQL query results of 2 DBs.

dbquery db1 select * from nodelist
| union [ dbquery db2 select * from nodelist ]