Product Solutions Support
Try MemSQL

UNION

Combines results from multiple SELECT statements. UNION DISTINCT removes duplicate rows, while UNION ALL does not remove them. UNION is equivalent to UNION DISTINCT.

Syntax

SELECT ...
UNION [ALL | DISTINCT] SELECT ...
[UNION [ALL | DISTINCT] SELECT ...]

Remarks

Examples

memsql> SELECT * FROM table_a UNION ALL SELECT * FROM table_b;
memsql> SELECT * FROM table_a UNION SELECT * FROM table_b;
Was this article useful?