> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ALL 子句文档

# ALL 子句

如果一张表中有多条匹配的行，`ALL` 会返回其中的所有行。`SELECT ALL` 与不使用 `DISTINCT` 的 `SELECT` 完全相同。如果同时指定 `ALL` 和 `DISTINCT`，则会抛出异常。

`ALL` 也可以在聚合函数中指定，不过它对查询结果实际上没有影响。

例如：

```sql theme={null}
SELECT sum(ALL number) FROM numbers(10);
```

等同于：

```sql theme={null}
SELECT sum(number) FROM numbers(10);
```
