> ## 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.

> 包含所有表中现有投影信息的系统表。

# system.projections

<div id="description">
  ## 描述
</div>

包含所有表中现有投影的信息。

<div id="columns">
  ## 列
</div>

* `database` ([String](/zh/reference/data-types)) — 数据库名称。
* `table` ([String](/zh/reference/data-types)) — 表名称。
* `name` ([String](/zh/reference/data-types)) — 投影名称。
* `type` ([Enum8('Normal' = 0, 'Aggregate' = 1)](/zh/reference/data-types)) — 投影类型。
* `sorting_key` ([Array(String)](/zh/reference/data-types)) — 投影排序键。
* `query` ([String](/zh/reference/data-types)) — 投影查询语句。
* `settings` ([Map(String, String)](/zh/reference/data-types)) — 投影设置。

<div id="example">
  ## 示例
</div>

```sql theme={null}
SELECT * FROM system.projections LIMIT 2 FORMAT Vertical;
```

```text theme={null}
Row 1:
──────
database:    default
table:       landing
name:        improved_sorting_key
type:        Normal
sorting_key: ['user_id','date']
query:       SELECT * ORDER BY user_id, date
settings:     {}

Row 2:
──────
database:    default
table:       landing
name:        agg_no_key
type:        Aggregate
sorting_key: []
query:       SELECT count()
settings:     {}
```
