v.21.9New Feature
Add Support for INTERSECT, EXCEPT, ANY, ALL Operators
Add support for INTERSECT, EXCEPT, ANY, ALL operators. #24757 (Kirill Ershov). (Kseniia Sumarokova).
Why it matters
This feature extends ClickHouse's SQL capabilities by enabling users to perform set operations that return the common or distinct elements between query results. Support forANY and ALL modifiers allows more precise control over how duplicates are handled in these operations, improving the expressiveness and compatibility of ClickHouse with standard SQL.How to use it
Users can now write queries using theINTERSECT and EXCEPT operators directly in their SQL statements. Additionally, they can specify ANY or ALL modifiers after these operators to control duplicate row handling, for example:SELECT FROM table1 INTERSECT ALL SELECT FROM table2This feature requires no additional configuration and is available once the ClickHouse version including this update is installed.