Relational Data - Statements - Select - All

From FojiSoft Docs
Revision as of 18:52, 28 August 2024 by Chris.Hansen (talk | contribs) (Import ClickHouse Docs: Wed Aug 28 2024 14:52:44 GMT-0400 (Eastern Daylight Time))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

If there are multiple matching rows in the table, then ALL returns all of them. SELECT ALL is identical to SELECT without DISTINCT. If both ALL and DISTINCT specified, exception will be thrown.

ALL can also be specified inside aggregate function with the same effect(noop), for instance:

SELECT sum(ALL number) FROM numbers(10);

equals to

SELECT sum(number) FROM numbers(10);