Skip to content

Commit 450fde6

Browse files
sundy-lib41sh
andauthored
docs: add RENAME DICTIONARY SQL reference (#3160)
* docs: add rename dictionary sql reference * update --------- Co-authored-by: baishen <baishen2009@gmail.com>
1 parent e42ac84 commit 450fde6

6 files changed

Lines changed: 68 additions & 2 deletions

File tree

docs/cn/sql-reference/10-sql-commands/00-ddl/17-dictionary/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Dictionary 提供了一种基于键值对的方法,用于从各种外部数据
1010
|---------|-------------|
1111
| [CREATE DICTIONARY](create-dictionary.md) | 创建字典 |
1212
| [DROP DICTIONARY](drop-dictionary.md) | 删除字典 |
13+
| [RENAME DICTIONARY](rename-dictionary.md) | 重命名字典 |
1314

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: RENAME DICTIONARY
3+
sidebar_position: 3
4+
---
5+
6+
重命名一个字典。
7+
8+
## 语法
9+
10+
```sql
11+
RENAME DICTIONARY [ IF EXISTS ]
12+
[ <catalog_name>. ][ <database_name>. ]<dictionary_name>
13+
TO [ <new_catalog_name>. ][ <new_database_name>. ]<new_dictionary_name>
14+
```
15+
16+
## 参数
17+
18+
| 参数 | 说明 |
19+
|-----------|-------------|
20+
| `IF EXISTS` | 可选。如果源字典不存在,则忽略错误。 |
21+
| `<dictionary_name>` | 当前字典名称。 |
22+
| `<new_dictionary_name>` | 新的字典名称。 |
23+
24+
## 示例
25+
26+
```sql
27+
RENAME DICTIONARY user_info TO user_profile;
28+
```
29+
30+
```sql
31+
RENAME DICTIONARY IF EXISTS default.user_info TO analytics.user_profile;
32+
```

docs/cn/sql-reference/10-sql-commands/00-ddl/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ title: DDL(Data Definition Language)命令
88

99
| 组件 | 描述 |
1010
|-----------|-------------|
11-
| **[Catalog](09-catalog/index.md)** | 查看可用 catalog 列表 |
11+
| **[Catalog](09-catalog/index.md)** | 创建、删除和查看 catalog 列表 |
1212
| **[数据库](00-database/index.md)** | 创建、修改和删除数据库 |
1313
| **[](01-table/index.md)** | 创建、修改和管理表 |
1414
| **[表版本管理 (Table Versioning)](21-table-versioning/index.md)** | 创建命名快照标签用于时间回溯 |

docs/en/sql-reference/10-sql-commands/00-ddl/17-dictionary/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ Dictionary provides a key-value approach for reading data from various external
1010
|---------|-------------|
1111
| [CREATE DICTIONARY](create-dictionary.md) | Creates a dictionary |
1212
| [DROP DICTIONARY](drop-dictionary.md) | Deletes a dictionary |
13+
| [RENAME DICTIONARY](rename-dictionary.md) | Renames a dictionary |
1314

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
title: RENAME DICTIONARY
3+
sidebar_position: 3
4+
---
5+
6+
Renames a dictionary.
7+
8+
## Syntax
9+
10+
```sql
11+
RENAME DICTIONARY [ IF EXISTS ]
12+
[ <catalog_name>. ][ <database_name>. ]<dictionary_name>
13+
TO [ <new_catalog_name>. ][ <new_database_name>. ]<new_dictionary_name>
14+
```
15+
16+
## Parameters
17+
18+
| Parameter | Description |
19+
|-----------|-------------|
20+
| `IF EXISTS` | Optional. Suppresses the error if the source dictionary does not exist. |
21+
| `<dictionary_name>` | The current dictionary name. |
22+
| `<new_dictionary_name>` | The new dictionary name. |
23+
24+
## Examples
25+
26+
```sql
27+
RENAME DICTIONARY user_info TO user_profile;
28+
```
29+
30+
```sql
31+
RENAME DICTIONARY IF EXISTS default.user_info TO analytics.user_profile;
32+
```

docs/en/sql-reference/10-sql-commands/00-ddl/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ These topics provide reference information for the DDL (Data Definition Language
88

99
| Component | Description |
1010
|-----------|-------------|
11-
| **[Catalog](09-catalog/index.md)** | List available catalogs |
11+
| **[Catalog](09-catalog/index.md)** | Create, drop and list catalogs |
1212
| **[Database](00-database/index.md)** | Create, alter, and drop databases |
1313
| **[Table](01-table/index.md)** | Create, alter, and manage tables |
1414
| **[Table Versioning](21-table-versioning/index.md)** | Create named snapshot tags for time travel |

0 commit comments

Comments
 (0)