Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-database macros for the intersect and except operators #154

Open
dbeatty10 opened this issue Jun 12, 2023 · 0 comments
Open

Cross-database macros for the intersect and except operators #154

dbeatty10 opened this issue Jun 12, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@dbeatty10
Copy link
Owner

dbeatty10 commented Jun 12, 2023

Describe the feature

Add cross-database macros for the intersect and except 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:

select version();

MySQL 8.0 Release Notes

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)

@dbeatty10 dbeatty10 added the enhancement New feature or request label Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant