There was an error while loading. Please reload this page.
SQL standard defines the following set operations:
UNION [ALL | DISTINCT] | EXCEPT [ALL | DISTINCT] | INTERSECT [ALL | DISTINCT]
All dialects support UNION, with rest there are variations:
UNION
BigQuery:
UNION {ALL | DISTINCT} | EXCEPT DISTINCT | INTERSECT DISTINCT
DB2:
UNION [ALL] | EXCEPT [ALL] | INTERSECT [ALL]
DuckDB:
UNION [ALL | BY NAME] | EXCEPT [ALL] | INTERSECT [ALL]
Hive:
UNION [ALL | DISTINCT]
MariaDB:
UNION [ALL | DISTINCT] | EXCEPT [ALL | DISTINCT] | INTERSECT [ALL | DISTINCT] | MINUS [ALL | DISTINCT]
MySQL:
N1QL:
PL/SQL:
UNION [ALL] | MINUS | INTERSECT
PostgreSQL:
Redshift:
UNION [ ALL ] | EXCEPT | INTERSECT | MINUS
SingleStoreDB (union, intersect, except and minus):
UNION [ALL | DISTINCT] | EXCEPT | INTERSECT | MINUS
Snowflake:
UNION [ALL] | EXCEPT | MINUS | INTERSECT
Spark:
SQLite:
UNION [ALL] | EXCEPT | INTERSECT
TiDB:
Transact-SQL:
Trino: