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

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

包含当前用户可访问的数据库信息。

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

* `name` ([String](/zh/reference/data-types)) — 数据库名称。
* `engine` ([String](/zh/reference/data-types)) — 数据库引擎。
* `data_path` ([String](/zh/reference/data-types)) — 数据路径。
* `metadata_path` ([String](/zh/reference/data-types)) — 元数据路径。
* `uuid` ([UUID](/zh/reference/data-types)) — 数据库 UUID。
* `engine_full` ([String](/zh/reference/data-types)) — 数据库引擎参数。
* `comment` ([String](/zh/reference/data-types)) — 数据库注释。
* `is_external` ([UInt8](/zh/reference/data-types)) — 数据库是否为外部数据库 (即 PostgreSQL/DataLakeCatalog) 。

此系统表中的 `name` 列用于实现 `SHOW DATABASES` 查询。

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

创建数据库。

```sql title="Query" theme={null}
CREATE DATABASE test;
```

查看该用户可用的所有数据库。

```sql title="Query" theme={null}
SELECT * FROM system.databases;
```

```text title="Response" theme={null}
┌─name────────────────┬─engine─────┬─data_path────────────────────┬─metadata_path─────────────────────────────────────────────────────────┬─uuid─────────────────────────────────┬─engine_full────────────────────────────────────────────┬─comment─┐
│ INFORMATION_SCHEMA  │ Memory     │ /data/clickhouse_data/       │                                                                       │ 00000000-0000-0000-0000-000000000000 │ Memory                                                 │         │
│ default             │ Atomic     │ /data/clickhouse_data/store/ │ /data/clickhouse_data/store/f97/f97a3ceb-2e8a-4912-a043-c536e826a4d4/ │ f97a3ceb-2e8a-4912-a043-c536e826a4d4 │ Atomic                                                 │         │
│ information_schema  │ Memory     │ /data/clickhouse_data/       │                                                                       │ 00000000-0000-0000-0000-000000000000 │ Memory                                                 │         │
│ replicated_database │ Replicated │ /data/clickhouse_data/store/ │ /data/clickhouse_data/store/da8/da85bb71-102b-4f69-9aad-f8d6c403905e/ │ da85bb71-102b-4f69-9aad-f8d6c403905e │ Replicated('some/path/database', 'shard1', 'replica1') │         │
│ system              │ Atomic     │ /data/clickhouse_data/store/ │ /data/clickhouse_data/store/b57/b5770419-ac7a-4b67-8229-524122024076/ │ b5770419-ac7a-4b67-8229-524122024076 │ Atomic                                                 │         │
│ test                │ Atomic     │ /data/clickhouse_data/store/ │ /data/clickhouse_data/store/2a1/2a1b3c4d-5e6f-7890-abcd-ef1234567890/ │ 2a1b3c4d-5e6f-7890-abcd-ef1234567890 │ Atomic                                                 │         │
└─────────────────────┴────────────┴──────────────────────────────┴───────────────────────────────────────────────────────────────────────┴──────────────────────────────────────┴────────────────────────────────────────────────────────┴─────────┘
```
