Open dbeatty10 opened 1 year ago
Add cross-database macros for the intersect and except operators.
intersect
except
These two operators are not available prior to MySQL 8.0.31.
The following query will return the version number of the MySQL server:
select version();
Changes in MySQL 8.0.31 (2022-10-11, General Availability):
In this release MySQL adds support for the SQL standard INTERSECT and EXCEPT table operators. query_a INTERSECT query_b includes only rows appearing in both result sets. query_a EXCEPT query_b returns any rows from the result set of query_a which are not in the result of query_b. INTERSECT and EXCEPT both support DISTINCT and ALL, with DISTINCT the default in both cases. (This is the same as for UNION). INTERSECT groups before EXCEPT or UNION, so TABLE r EXCEPT TABLE s INTERSECT TABLE t is evaluated as TABLE r EXCEPT (TABLE s INTERSECT TABLE t). See INTERSECT Clause, and EXCEPT Clause, for additional information and examples. (Bug #1309, Bug #31336, Bug #11747209, Bug #11744757, WL #349)
In this release MySQL adds support for the SQL standard INTERSECT and EXCEPT table operators.
query_a INTERSECT query_b includes only rows appearing in both result sets.
query_a EXCEPT query_b returns any rows from the result set of query_a which are not in the result of query_b.
INTERSECT and EXCEPT both support DISTINCT and ALL, with DISTINCT the default in both cases. (This is the same as for UNION).
INTERSECT groups before EXCEPT or UNION, so TABLE r EXCEPT TABLE s INTERSECT TABLE t is evaluated as TABLE r EXCEPT (TABLE s INTERSECT TABLE t).
See INTERSECT Clause, and EXCEPT Clause, for additional information and examples. (Bug #1309, Bug #31336, Bug #11747209, Bug #11744757, WL #349)
Describe the feature
Add cross-database macros for the
intersect
andexcept
operators.Additional context
These two operators are not available prior to MySQL 8.0.31.
The following query will return the version number of the MySQL server:
MySQL 8.0 Release Notes
Changes in MySQL 8.0.31 (2022-10-11, General Availability):