mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-08 08:35:20 +00:00
22 lines
421 B
Markdown
22 lines
421 B
Markdown
|
---
|
||
|
toc_title: ALL
|
||
|
---
|
||
|
|
||
|
# ALL Clause {#select-all}
|
||
|
|
||
|
`SELECT ALL` is identical to `SELECT` without `DISTINCT`.
|
||
|
|
||
|
- If `ALL` specified, ignore it.
|
||
|
- 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:
|
||
|
|
||
|
```sql
|
||
|
SELECT sum(ALL number) FROM numbers(10);
|
||
|
```
|
||
|
equals to
|
||
|
|
||
|
```sql
|
||
|
SELECT sum(number) FROM numbers(10);
|
||
|
```
|