Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
V0087
The specification states the following:
-
Subclause 7.13, "<query expression>": <query expression> ::= [ <with clause> ] <query expression body> [ <order by clause> ] [ <fetch first clause> ] <with clause> ::= WITH [ RECURSIVE ] <with list> ... <query expression body> ::= <query term> | <query expression body> UNION [ ALL | DISTINCT ] [ <corresponding spec> ] <query term> | <query expression body> EXCEPT [ ALL | DISTINCT ] [ <corresponding spec> ] <query term> <query term> ::= <query primary> | <query term> INTERSECT [ ALL | DISTINCT ] [ <corresponding spec> ] <query primary> ... Conformance Rules Without Feature F304, "EXCEPT ALL table operator", conforming SQL language shall not contain a <query expression> that contains EXCEPT ALL. NOTE — If DISTINCT, INTERSECT or EXCEPT is specified, then the Conformance Rules of Subclause 9.12, "Grouping operations", apply. Subclause 9.12, "Grouping operations": Without Feature S024, "Enhanced structured types", in conforming SQL language, the declared type of an operand of a grouping operation shall not be ST-ordered.
Microsoft SQL Server 2008 R2 and Microsoft SQL Server 2012 vary as follows:
Transact-SQL partially supports this feature. Transact-SQL does not support the DISTINCT keyword, but SQL Server provides the DISTINCT functionality implicitly by default.