You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by ji...@apache.org on 2022/11/04 11:36:13 UTC
[shardingsphere] branch master updated: Update DistSql documents (#21961)
This is an automated email from the ASF dual-hosted git repository.
jianglongtao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new bf1eead5b8c Update DistSql documents (#21961)
bf1eead5b8c is described below
commit bf1eead5b8c0e0f56102dca57fb7f404a584ab6d
Author: Zichao <57...@users.noreply.github.com>
AuthorDate: Sat Nov 5 00:36:05 2022 +1300
Update DistSql documents (#21961)
* Update DistSql documents
* Update DistSql documents
* Update DistSql documents
---
.../syntax/ral/migration/check-migration.cn.md | 8 +-
.../syntax/ral/migration/check-migration.en.md | 6 +-
.../syntax/ral/migration/commit-migration.cn.md | 5 +-
.../syntax/ral/migration/commit-migration.en.md | 3 +-
.../syntax/ral/migration/rollback-migration.cn.md | 5 +-
.../syntax/ral/migration/rollback-migration.en.md | 3 +-
.../migration/show-migration-check-status.cn.md | 5 +-
.../migration/show-migration-check-status.en.md | 3 +-
.../ral/migration/start-migration-check.cn.md | 5 +-
.../ral/migration/start-migration-check.en.md | 3 +-
.../syntax/ral/migration/start-migration.cn.md | 5 +-
.../syntax/ral/migration/start-migration.en.md | 3 +-
.../ral/migration/stop-migration-check.cn.md | 5 +-
.../ral/migration/stop-migration-check.en.md | 3 +-
.../syntax/ral/migration/stop-migration.cn.md | 5 +-
.../syntax/ral/migration/stop-migration.en.md | 5 +-
.../encrypt/alter-encrypt-rule.cn.md | 1 +
.../encrypt/alter-encrypt-rule.en.md | 3 +-
.../encrypt/create-encrypt-rule.cn.md | 5 +-
.../encrypt/create-encrypt-rule.en.md | 3 +-
.../alter-sharding-table-reference-rule.cn.md | 50 +++++++++++
.../alter-sharding-table-reference-rule.en.md | 52 ++++++++++++
.../sharding/alter-sharding-table-rule.cn.md | 91 +++-----------------
.../sharding/alter-sharding-table-rule.en.md | 99 ++++------------------
.../create-sharding-table-reference-rule.cn.md | 6 +-
.../create-sharding-table-reference-rule.en.md | 6 +-
.../sharding/create-sharding-table-rule.cn.md | 91 +++-----------------
.../sharding/create-sharding-table-rule.en.md | 98 ++++-----------------
.../sharding/drop-broadcast-table-rule.cn.md | 38 +++++++++
.../sharding/drop-broadcast-table-rule.en.md | 38 +++++++++
.../drop-sharding-table-reference-rule.cn.md | 44 ++++++++++
.../drop-sharding-table-reference-rule.en.md | 44 ++++++++++
.../show-sharding-table-reference-rules.cn.md | 72 ++++++++++++++++
.../show-sharding-table-reference-rules.en.md | 70 +++++++++++++++
.../reference/distsql/syntax/rul/_index.cn.md | 7 ++
.../reference/distsql/syntax/rul/_index.en.md | 8 ++
.../reference/distsql/syntax/rul/format-sql.cn.md | 48 +++++++++++
.../reference/distsql/syntax/rul/format-sql.en.md | 48 +++++++++++
.../reference/distsql/syntax/rul/parse-sql.cn.md | 48 +++++++++++
.../reference/distsql/syntax/rul/parse-sql.en.md | 48 +++++++++++
.../reference/distsql/syntax/rul/preview-sql.cn.md | 48 +++++++++++
.../reference/distsql/syntax/rul/preview-sql.en.md | 48 +++++++++++
42 files changed, 828 insertions(+), 358 deletions(-)
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/check-migration.cn.md b/docs/document/content/reference/distsql/syntax/ral/migration/check-migration.cn.md
index f4ceb8885b3..24da4eb4f48 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/check-migration.cn.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/check-migration.cn.md
@@ -23,9 +23,9 @@ migrationCheckAlgorithmType ::=
### 补充说明
-- `migrationJobId` 需要通过 `SHOW MIGRATION LIST` 语法查询获得
+- `migrationJobId` 需要通过 [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/) 语法查询获得
-- `migrationCheckAlgorithmType` 需要通过 `SHOW MIGRATION CHECK ALGORITHMS` 语法查询获得
+- `migrationCheckAlgorithmType` 需要通过 [SHOW MIGRATION CHECK ALGORITHMS](/cn/reference/distsql/syntax/ral/migration/show-migration-check-algorithm/) 语法查询获得
### 示例
@@ -41,4 +41,6 @@ CHECK MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6' BY TYPE (NAME='CRC32_MAT
### 相关链接
-- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/)
+- [SHOW MIGRATION CHECK ALGORITHMS](/cn/reference/distsql/syntax/ral/migration/show-migration-check-algorithm/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/check-migration.en.md b/docs/document/content/reference/distsql/syntax/ral/migration/check-migration.en.md
index 120e6ebbf82..0830ebe5e17 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/check-migration.en.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/check-migration.en.md
@@ -22,9 +22,9 @@ migrationCheckAlgorithmType ::=
### Supplement
-- `migrationJobId` needs to be obtained through `SHOW MIGRATION LIST` syntax query
+- `migrationJobId` needs to be obtained through [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/) syntax query
-- `migrationCheckAlgorithmType` needs to be obtained through `SHOW MIGRATION CHECK ALGORITHMS` syntax query
+- `migrationCheckAlgorithmType` needs to be obtained through [SHOW MIGRATION CHECK ALGORITHMS](/en/reference/distsql/syntax/ral/migration/show-migration-check-algorithm/) syntax query
### Example
@@ -41,3 +41,5 @@ CHECK MIGRATION 'j01016e501b498ed1bdb2c373a2e85e2529a6' BY TYPE (NAME='CRC32_MAT
### Related links
- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/)
+- [SHOW MIGRATION CHECK ALGORITHMS](/en/reference/distsql/syntax/ral/migration/show-migration-check-algorithm/)
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/commit-migration.cn.md b/docs/document/content/reference/distsql/syntax/ral/migration/commit-migration.cn.md
index e9507b899af..3fa2c7d65e2 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/commit-migration.cn.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/commit-migration.cn.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### 补充说明
-- `migrationJobId` 需要通过 `SHOW MIGRATION LIST` 语法查询获得
+- `migrationJobId` 需要通过 [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/) 语法查询获得
### 示例
@@ -35,4 +35,5 @@ COMMIT MIGRATION 'j010180026753ef0e25d3932d94d1673ba551';
### 相关链接
-- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/commit-migration.en.md b/docs/document/content/reference/distsql/syntax/ral/migration/commit-migration.en.md
index 0d3ab5a3750..fa7108a1463 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/commit-migration.en.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/commit-migration.en.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### Supplement
-- `migrationJobId` needs to be obtained through `SHOW MIGRATION LIST` syntax query
+- `migrationJobId` needs to be obtained through [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/) syntax query
### Example
@@ -36,3 +36,4 @@ COMMIT MIGRATION 'j010180026753ef0e25d3932d94d1673ba551';
### Related links
- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/)
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/rollback-migration.cn.md b/docs/document/content/reference/distsql/syntax/ral/migration/rollback-migration.cn.md
index a4c8d3faf6c..73d5c9855bd 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/rollback-migration.cn.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/rollback-migration.cn.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### 补充说明
-- `migrationJobId` 需要通过 `SHOW MIGRATION LIST` 语法查询获得
+- `migrationJobId` 需要通过 [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/) 语法查询获得
- 该语句执行后会清理目标端
@@ -37,4 +37,5 @@ ROLLBACK MIGRATION 'j010180026753ef0e25d3932d94d1673ba551';
### 相关链接
-- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/rollback-migration.en.md b/docs/document/content/reference/distsql/syntax/ral/migration/rollback-migration.en.md
index c8993dafa22..1d00f5dd3a2 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/rollback-migration.en.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/rollback-migration.en.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### Supplement
-- `migrationJobId` needs to be obtained through `SHOW MIGRATION LIST` syntax query
+- `migrationJobId` needs to be obtained through [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/) syntax query
- After the statement is executed, the target will be cleaned up
@@ -38,3 +38,4 @@ ROLLBACK MIGRATION 'j010180026753ef0e25d3932d94d1673ba551';
### Related links
- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/)
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/show-migration-check-status.cn.md b/docs/document/content/reference/distsql/syntax/ral/migration/show-migration-check-status.cn.md
index 40b19733968..a468bbd3f3f 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/show-migration-check-status.cn.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/show-migration-check-status.cn.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### 补充说明
-- `migrationJobId` 需要通过 `SHOW MIGRATION LIST` 语法查询获得
+- `migrationJobId` 需要通过 [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/) 语法查询获得
### 返回值说明
@@ -57,4 +57,5 @@ mysql> SHOW MIGRATION CHECK STATUS 'j010180026753ef0e25d3932d94d1673ba551';
### 相关链接
-- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/show-migration-check-status.en.md b/docs/document/content/reference/distsql/syntax/ral/migration/show-migration-check-status.en.md
index b69a0e62acf..ef9dd803330 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/show-migration-check-status.en.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/show-migration-check-status.en.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### Supplement
-- `migrationJobId` needs to be obtained through `SHOW MIGRATION LIST` syntax query
+- `migrationJobId` needs to be obtained through [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/) syntax query
### Return Value Description
@@ -58,3 +58,4 @@ mysql> SHOW MIGRATION CHECK STATUS 'j010180026753ef0e25d3932d94d1673ba551';
### Related links
- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/)
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/start-migration-check.cn.md b/docs/document/content/reference/distsql/syntax/ral/migration/start-migration-check.cn.md
index a671d719d8d..b885d09e9f8 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/start-migration-check.cn.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/start-migration-check.cn.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### 补充说明
-- `migrationJobId` 需要通过 `SHOW MIGRATION LIST` 语法查询获得
+- `migrationJobId` 需要通过 [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/) 语法查询获得
### 示例
@@ -35,4 +35,5 @@ START MIGRATION CHECK 'j010180026753ef0e25d3932d94d1673ba551';
### 相关链接
-- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/start-migration-check.en.md b/docs/document/content/reference/distsql/syntax/ral/migration/start-migration-check.en.md
index a57af6db58a..a5feeb24c29 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/start-migration-check.en.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/start-migration-check.en.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### Supplement
-- `migrationJobId` needs to be obtained through `SHOW MIGRATION LIST` syntax query
+- `migrationJobId` needs to be obtained through [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/) syntax query
### Example
@@ -36,3 +36,4 @@ START MIGRATION CHECK 'j010180026753ef0e25d3932d94d1673ba551';
### Related links
- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/)
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/start-migration.cn.md b/docs/document/content/reference/distsql/syntax/ral/migration/start-migration.cn.md
index 6bc20c67a21..e2637d8831d 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/start-migration.cn.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/start-migration.cn.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### 补充说明
-- `migrationJobId` 需要通过 `SHOW MIGRATION LIST` 语法查询获得
+- `migrationJobId` 需要通过 [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/) 语法查询获得
### 示例
@@ -35,4 +35,5 @@ START MIGRATION 'j010180026753ef0e25d3932d94d1673ba551';
### 相关链接
-- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/start-migration.en.md b/docs/document/content/reference/distsql/syntax/ral/migration/start-migration.en.md
index 04c132c108c..d35e6b94bb4 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/start-migration.en.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/start-migration.en.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### Supplement
-- `migrationJobId` needs to be obtained through `SHOW MIGRATION LIST` syntax query
+- `migrationJobId` needs to be obtained through [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/) syntax query
### Example
@@ -36,3 +36,4 @@ START MIGRATION 'j010180026753ef0e25d3932d94d1673ba551';
### Related links
- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/)
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration-check.cn.md b/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration-check.cn.md
index c819ac8fea4..8b9b7c7635b 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration-check.cn.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration-check.cn.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### 补充说明
-- `migrationJobId` 需要通过 `SHOW MIGRATION LIST` 语法查询获得
+- `migrationJobId` 需要通过 [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/) 语法查询获得
### 示例
@@ -35,4 +35,5 @@ STOP MIGRATION CHECK 'j010180026753ef0e25d3932d94d1673ba551';
### 相关链接
-- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration-check.en.md b/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration-check.en.md
index e8ee82b49b3..d9385142907 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration-check.en.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration-check.en.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### Supplement
-- `migrationJobId` needs to be obtained through `SHOW MIGRATION LIST` syntax query
+- `migrationJobId` needs to be obtained through [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/) syntax query
### Example
@@ -36,3 +36,4 @@ STOP MIGRATION CHECK 'j010180026753ef0e25d3932d94d1673ba551';
### Related links
- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/)
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration.cn.md b/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration.cn.md
index f072a4813d2..6054164e979 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration.cn.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration.cn.md
@@ -19,7 +19,7 @@ migrationJobId ::=
### 补充说明
-- `migrationJobId` 需要通过 `SHOW MIGRATION LIST` 语法查询获得
+- `migrationJobId` 需要通过 [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/) 语法查询获得
### 示例
@@ -35,4 +35,5 @@ STOP MIGRATION 'j010180026753ef0e25d3932d94d1673ba551';
### 相关链接
-- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/cn/reference/distsql/syntax/ral/migration/show-migration-list/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration.en.md b/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration.en.md
index 523404253b6..c03c74c2065 100644
--- a/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration.en.md
+++ b/docs/document/content/reference/distsql/syntax/ral/migration/stop-migration.en.md
@@ -11,7 +11,7 @@ The `STOP MIGRATION` syntax is used to stop migration process.
```sql
StopMigration ::=
- 'STOP' 'MIGRATION' ' migrationJobId
+ 'STOP' 'MIGRATION' migrationJobId
migrationJobId ::=
string
@@ -19,7 +19,7 @@ migrationJobId ::=
### Supplement
-- `migrationJobId` needs to be obtained through `SHOW MIGRATION LIST` syntax query
+- `migrationJobId` needs to be obtained through [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/) syntax query
### Example
@@ -36,3 +36,4 @@ STOP MIGRATION 'j010180026753ef0e25d3932d94d1673ba551';
### Related links
- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
+- [SHOW MIGRATION LIST](/en/reference/distsql/syntax/ral/migration/show-migration-list/)
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.cn.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.cn.md
index 109e87220ea..58e6a95da94 100644
--- a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.cn.md
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.cn.md
@@ -61,3 +61,4 @@ COLUMNS(
### 相关链接
- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+- [加密算法](/cn/user-manual/common-config/builtin-algorithm/encrypt/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.en.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.en.md
index 9c23eaaa0f8..d672d8c2c44 100644
--- a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.en.md
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/alter-encrypt-rule.en.md
@@ -38,7 +38,7 @@ encryptAlgorithmType ::=
### Supplement
- `PLAIN` specifies the plain column, `CIPHER` specifies the cipher column
-- `encryptAlgorithmType` specifies the encryption algorithm type, please refer to Encryption Algorithm
+- `encryptAlgorithmType` specifies the encryption algorithm type, please refer to [Encryption Algorithm](/en/user-manual/common-config/builtin-algorithm/encrypt/)
- `queryWithCipherColumn` support uppercase or lowercase true or false
### Example
@@ -60,3 +60,4 @@ COLUMNS(
### Related links
- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
+- [Encryption Algorithm](/en/user-manual/common-config/builtin-algorithm/encrypt/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.cn.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.cn.md
index 3fe83a05726..c963acf01be 100644
--- a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.cn.md
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.cn.md
@@ -38,7 +38,7 @@ encryptAlgorithmType ::=
### 补充说明
- `PLAIN` 指定明文数据列,`CIPHER` 指定密文数据列;
-- `encryptAlgorithmType` 指定加密算法类型,请参考 加密算法;
+- `encryptAlgorithmType` 指定加密算法类型,请参考 [加密算法](/cn/user-manual/common-config/builtin-algorithm/encrypt/);
- 重复的 `tableName` 将无法被创建;
- queryWithCipherColumn 支持大写或小写的 `true` 或 `false`。
@@ -65,4 +65,5 @@ COLUMNS(
### 相关链接
-- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+- [加密算法](/cn/user-manual/common-config/builtin-algorithm/encrypt/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.en.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.en.md
index 8d588e17e1b..89853e4b75f 100644
--- a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.en.md
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/encrypt/create-encrypt-rule.en.md
@@ -38,7 +38,7 @@ encryptAlgorithmType ::=
### Supplement
- `PLAIN` specifies the plain column, `CIPHER` specifies the cipher column
-- `encryptAlgorithmType` specifies the encryption algorithm type, please refer to Encryption Algorithm
+- `encryptAlgorithmType` specifies the encryption algorithm type, please refer to [Encryption Algorithm](/en/user-manual/common-config/builtin-algorithm/encrypt/)
- Duplicate `tableName` will not be created
- `queryWithCipherColumn` support uppercase or lowercase true or false
@@ -66,3 +66,4 @@ COLUMNS(
### Related links
- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
+- [Encryption Algorithm](/en/user-manual/common-config/builtin-algorithm/encrypt/)
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-reference-rule.cn.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-reference-rule.cn.md
new file mode 100644
index 00000000000..e4ea62cc1b5
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-reference-rule.cn.md
@@ -0,0 +1,50 @@
++++
+title = "ALTER SHARDING TABLE REFERENCE RULE"
+weight = 14
++++
+
+## 描述
+
+`ALTER SHARDING TABLE REFERENCE RULE` 语法用于修改关联规则
+
+### 语法定义
+
+```sql
+AlterShardingTableReferenceRule ::=
+ 'ALTER' 'SHARDING' 'TABLE' 'REFERENCE' 'RULE' referenceRelationshipDefinition (',' referenceRelationshipDefinition )*
+
+referenceRelationshipDefinition ::=
+ '(' tableName (',' tableName)* ')'
+
+tableName ::=
+ identifier
+```
+
+### 补充说明
+
+- 一个分片表只能具有一个关联关系;
+- 添加关联关系的分片表需要使用相同的存储单元,并且分片节点个数相同。例如 `su_${0..1}.t_order_${0..1}` 与 `su_${0..1}.t_order_item_${0..1}`;
+- 添加关联关系的分片表需要对分片键使用相同的分片算法。例如 `t_order_${order_id % 2}` 与 `t_order_item_${order_item_id % 2}`;
+
+### 示例
+
+#### 1.创建关联关系
+
+```sql
+ALTER SHARDING TABLE REFERENCE RULE (t_order,t_order_item);
+```
+
+#### 2.创建多个关联关系
+
+```sql
+ALTER SHARDING TABLE REFERENCE RULE (t_order,t_order_item),(t_product,t_product_item);
+```
+
+### 保留字
+
+`ALTER`、`SHARDING`、`TABLE`、`REFERENCE`、`RULE`
+
+### 相关链接
+
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+- [CREATE SHARDING TABLE RULE](/cn/reference/distsql/syntax/rdl/rule-definition/create-sharding-table-rule/)
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-reference-rule.en.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-reference-rule.en.md
new file mode 100644
index 00000000000..78bbdc8d896
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-reference-rule.en.md
@@ -0,0 +1,52 @@
++++
+title = "ALTER SHARDING TABLE REFERENCE RULE"
+weight = 14
++++
+
+## Description
+
+The `ALTER SHARDING TABLE REFERENCE RULE` syntax is used to alter reference table rules.
+
+### Syntax
+
+```sql
+AlterShardingTableReferenceRule ::=
+ 'ALTER' 'SHARDING' 'TABLE' 'REFERENCE' 'RULE' referenceRelationshipDefinition (',' referenceRelationshipDefinition )*
+
+referenceRelationshipDefinition ::=
+ '(' tableName (',' tableName)* ')'
+
+tableName ::=
+ identifier
+```
+
+### Supplement
+
+- A sharding table can only have one reference relationships;
+- The sharding table for creating reference relationships needs to use the same storage unit and the same actual tables. For
+ example `su_${0..1}.t_order_${0..1}` 与 `su_${0..1}.t_order_item_${0..1}`;
+- The sharding table for creating reference relationships needs to use the same sharding algorithm for the sharding
+ column. For example `t_order_{order_id % 2}` and `t_order_item_{order_item_id % 2}`;
+
+### Example
+
+#### 1. Alter a reference table rule
+
+```sql
+ALTER SHARDING TABLE REFERENCE RULE (t_order,t_order_item);
+```
+
+#### 2. Alter multiple reference table rules
+
+```sql
+ALTER SHARDING TABLE REFERENCE RULE (t_order,t_order_item),(t_product,t_product_item);
+```
+
+### Reserved word
+
+`ALTER`, `SHARDING`, `TABLE`, `REFERENCE`, `RULE`
+
+### Related links
+
+- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
+- [CREATE SHARDING TABLE RULE](/en/reference/distsql/syntax/rdl/rule-definition/create-sharding-table-rule/)
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.cn.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.cn.md
index 5eee81f8e88..a3c1efcb3b4 100644
--- a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.cn.md
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.cn.md
@@ -23,7 +23,7 @@ strategyDefinition ::=
'TYPE' '=' strategyType ',' ( 'SHARDING_COLUMN' | 'SHARDING_COLUMNS' ) '=' columnName ',' algorithmDefinition
keyGenerateStrategyDefinition ::=
- 'KEY_GENERATE_STRATEGY' '(' 'COLUMN' '=' columnName ',' ( 'KEY_GENERATOR' '=' algorihtmName | algorithmDefinition ) ')'
+ 'KEY_GENERATE_STRATEGY' '(' 'COLUMN' '=' columnName ',' algorithmDefinition ')'
auditStrategyDefinition ::=
'AUDIT_STRATEGY' '(' 'AUDITORS' '=' '[' auditorName ',' auditorName ']' ',' 'ALLOW_HINT_DISABLE' '=' 'TRUE | FALSE' ')'
@@ -31,7 +31,7 @@ auditStrategyDefinition ::=
'AUDIT_STRATEGY' '(' '[' 'NAME' '=' auditorName ',' algorithmDefinition ']' ',' '[' 'NAME' '=' auditorName ',' algorithmDefinition ']' ')'
algorithmDefinition ::=
- ('SHARDING_ALGORITHM' '=' algorithmName | 'TYPE' '(' 'NAME' '=' algorithmType ( ',' 'PROPERTIES' '(' propertyDefinition ')' )?')' )
+ 'TYPE' '(' 'NAME' '=' algorithmType ( ',' 'PROPERTIES' '(' propertyDefinition ')' )?')'
propertyDefinition ::=
( key '=' value ) ( ',' key '=' value )*
@@ -79,90 +79,24 @@ strategyType ::=
#### 1.标准分片规则
-- ##### 修改分片算法并修改标准分片规则为指定分片算法
-
-```sql
--- 修改分片算法
-ALTER SHARDING ALGORITHM database_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 4}"))
-), table_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${order_id % 4}"))
-);
-
--- 修改分片规则为指定分片算法
-ALTER SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..3}.t_order_item${0..3}"),
- DATABASE_STRATEGY(TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM=database_inline),
- TABLE_STRATEGY(TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=table_inline)
-);
-```
-
-- ##### 修改默认分库策略并修改标准分片规则为指定分片算法
-
```sql
--- 修改分片算法
-ALTER SHARDING ALGORITHM database_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 4}"))
-), table_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${order_id % 4}"))
-);
-
--- 修改默认分库策略
-ALTER DEFAULT SHARDING DATABASE STRATEGY (
- TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=database_inline
-);
-
--- 修改分片规则为指定分片算法
-ALTER SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..3}.t_order_item${0..3}"),
- TABLE_STRATEGY(TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=table_inline)
-);
-```
-
-- ##### 修改默认分库分表策略并修改标准分片规则为指定分片算法
-
-```sql
--- 修改分片算法
-ALTER SHARDING ALGORITHM database_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 4}"))
-), table_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${order_id % 4}"))
-);
-
--- 修改默认分库策略
-ALTER DEFAULT SHARDING DATABASE STRATEGY (
- TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=database_inline
-);
-
--- 修改默认分表策略
-ALTER DEFAULT SHARDING TABLE STRATEGY (
- TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=table_inline
-);
-
--- 修改分片规则
-ALTER SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..3}.t_order_item${0..3}")
-);
-```
-
-- ##### 修改标准分片规则的同时创建分片算法
-
-```sql
-ALTER SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..3}.t_order_item${0..3}"),
- DATABASE_STRATEGY(TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM(TYPE(NAME="inline", PROPERTIES("algorithm-expression"="ds_${user_id % 2}")))),
- TABLE_STRATEGY(TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM(TYPE(NAME="inline", PROPERTIES("algorithm-expression"="ds_${order_id % 2}"))))
+ALTER SHARDING TABLE RULE t_order_item (
+DATANODES("ds_${0..3}.t_order_item${0..3}"),
+DATABASE_STRATEGY(TYPE="standard",SHARDING_COLUMN=user_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="ds_${user_id % 4}")))),
+TABLE_STRATEGY(TYPE="standard",SHARDING_COLUMN=order_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="t_order_item_${order_id % 4}")))),
+KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME="snowflake")),
+AUDIT_STRATEGY(AUDITORS=[auditor1,auditor2],ALLOW_HINT_DISABLE=true)
);
```
#### 2.自动分片规则
-- ##### 修改自动分片规则
-
```sql
ALTER SHARDING TABLE RULE t_order (
- STORAGE_UNITS(ds_0, ds_1),
- SHARDING_COLUMN=order_id, TYPE(NAME="MOD", PROPERTIES("sharding-count"="4"))
+STORAGE_UNITS(ds_0,ds_1,ds_2,ds_3),
+SHARDING_COLUMN=order_id,TYPE(NAME="hash_mod",PROPERTIES("sharding-count"="16")),
+KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME="snowflake")),
+AUDIT_STRATEGY(AUDITORS=[auditor1,auditor2],ALLOW_HINT_DISABLE=true)
);
```
@@ -173,5 +107,4 @@ ALTER SHARDING TABLE RULE t_order (
### 相关链接
- [保留字](/cn/reference/distsql/syntax/reserved-word/)
-- [ALTER SHARDING ALGORITHM](/cn/reference/distsql/syntax/rdl/rule-definition/alter-sharding-algorithm/)
- [ALTER DEFAULT_SHARDING STRATEGY](/cn/reference/distsql/syntax/rdl/rule-definition/alter-default-sharding-strategy/)
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.en.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.en.md
index 15f35aa466d..afed65a9186 100644
--- a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.en.md
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/alter-sharding-table-rule.en.md
@@ -14,24 +14,24 @@ AlterShardingTableRule ::=
'ALTER' 'SHARDING' 'TABLE' 'RULE' ( tableDefinition | autoTableDefinition ) ( ',' ( tableDefinition | autoTableDefinition ) )*
tableDefinition ::=
- tableName '(' 'DATANODES' '(' dataNode ( ',' dataNode )* ')' ( ',' 'DATABASE_STRATEGY' '(' strategyDefinition ')' )? ( ',' 'TABLE_STRATEGY' '(' strategyDefinition ')' )? ( ',' 'KEY_GENERATE_STRATEGY' '(' keyGenerateStrategyDefinition ')' )? ( ',' 'AUDIT_STRATEGY' '(' auditStrategyDefinition ')' )? ')'
+ tableName '(' 'DATANODES' '(' dataNode ( ',' dataNode )* ')' ( ',' 'DATABASE_STRATEGY' '(' strategyDefinition ')' )? ( ',' 'TABLE_STRATEGY' '(' strategyDefinition ')' )? ( ',' 'KEY_GENERATE_STRATEGY' '(' keyGenerateStrategyDefinition ')' )? ( ',' 'AUDIT_STRATEGY' '(' auditStrategyDefinition ')' )? ')'
autoTableDefinition ::=
- tableName '(' 'STORAGE_UNITS' '(' storageUnitName ( ',' storageUnitName )* ')' ',' 'SHARDING_COLUMN' '=' columnName ',' algorithmDefinition ( ',' 'KEY_GENERATE_STRATEGY' '(' keyGenerateStrategyDefinition ')' )? ( ',' 'AUDIT_STRATEGY' '(' auditStrategyDefinition ')' )? ')'
+ tableName '(' 'STORAGE_UNITS' '(' storageUnitName ( ',' storageUnitName )* ')' ',' 'SHARDING_COLUMN' '=' columnName ',' algorithmDefinition ( ',' 'KEY_GENERATE_STRATEGY' '(' keyGenerateStrategyDefinition ')' )? ( ',' 'AUDIT_STRATEGY' '(' auditStrategyDefinition ')' )? ')'
strategyDefinition ::=
'TYPE' '=' strategyType ',' ( 'SHARDING_COLUMN' | 'SHARDING_COLUMNS' ) '=' columnName ',' algorithmDefinition
keyGenerateStrategyDefinition ::=
- 'KEY_GENERATE_STRATEGY' '(' 'COLUMN' '=' columnName ',' ( 'KEY_GENERATOR' '=' algorihtmName | algorithmDefinition ) ')'
-
+ 'KEY_GENERATE_STRATEGY' '(' 'COLUMN' '=' columnName ',' algorithmDefinition ')'
+
auditStrategyDefinition ::=
'AUDIT_STRATEGY' '(' 'AUDITORS' '=' '[' auditorName ',' auditorName ']' ',' 'ALLOW_HINT_DISABLE' '=' 'TRUE | FALSE' ')'
|
'AUDIT_STRATEGY' '(' '[' 'NAME' '=' auditorName ',' algorithmDefinition ']' ',' '[' 'NAME' '=' auditorName ',' algorithmDefinition ']' ')'
algorithmDefinition ::=
- ('SHARDING_ALGORITHM' '=' algorithmName | 'TYPE' '(' 'NAME' '=' algorithmType ( ',' 'PROPERTIES' '(' propertyDefinition ')' )?')' )
+ 'TYPE' '(' 'NAME' '=' algorithmType ( ',' 'PROPERTIES' '(' propertyDefinition ')' )?')'
propertyDefinition ::=
( key '=' value ) ( ',' key '=' value )*
@@ -44,7 +44,7 @@ storageUnitName ::=
columnName ::=
identifier
-
+
auditorName ::=
identifier
@@ -89,90 +89,24 @@ strategyType ::=
#### 1.Standard sharding table rule
-- ##### Alter standard sharding table rule to the specified sharding algorithms being altered
-
```SQL
--- alter sharding algorithms
-ALTER SHARDING ALGORITHM database_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 4}"))
-), table_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${order_id % 4}"))
-);
-
--- alter a sharding rule to the specified sharding algorithms being altered
-ALTER SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..3}.t_order_item${0..3}"),
- DATABASE_STRATEGY(TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM=database_inline),
- TABLE_STRATEGY(TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=table_inline)
-);
-```
-
-- ##### Use the altered default sharding database strategy, alter standard sharding table rule to the specified sharding algorithm being altered
-
-```sql
--- alter sharding algorithms
-ALTER SHARDING ALGORITHM database_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 4}"))
-), table_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${order_id % 4}"))
-);
-
--- alter a default sharding database strategy
-ALTER DEFAULT SHARDING DATABASE STRATEGY (
- TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=database_inline
-);
-
--- alter a sharding table rule to the specified sharding algorithm being altered
-ALTER SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..3}.t_order_item${0..3}"),
- TABLE_STRATEGY(TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=table_inline)
-);
-```
-
-- ##### Use both the altered default sharding and the altered default sharding strategy, alter standard sharding table rule
-
-```SQL
--- alter sharding algorithms
-ALTER SHARDING ALGORITHM database_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 4}"))
-), table_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${order_id % 4}"))
-);
-
--- alter a default sharding database strategy
-ALTER DEFAULT SHARDING DATABASE STRATEGY (
- TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=database_inline
-);
-
--- alter a default sharding table strategy
-ALTER DEFAULT SHARDING TABLE STRATEGY (
- TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=table_inline
-);
-
--- alter a sharding table rule
-ALTER SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..3}.t_order_item${0..3}")
-);
-```
-
-- ##### Alter standard sharding table rule and create sharding algorithms at the same time
-
-```sql
-ALTER SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..1}.t_order_${0..1}"),
- DATABASE_STRATEGY(TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM(TYPE(NAME="inline", PROPERTIES("algorithm-expression"="ds_${user_id % 2}")))),
- TABLE_STRATEGY(TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM(TYPE(NAME="inline", PROPERTIES("algorithm-expression"="ds_${order_id % 2}"))))
+ALTER SHARDING TABLE RULE t_order_item (
+DATANODES("ds_${0..3}.t_order_item${0..3}"),
+DATABASE_STRATEGY(TYPE="standard",SHARDING_COLUMN=user_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="ds_${user_id % 4}")))),
+TABLE_STRATEGY(TYPE="standard",SHARDING_COLUMN=order_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="t_order_item_${order_id % 4}")))),
+KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME="snowflake")),
+AUDIT_STRATEGY(AUDITORS=[auditor1,auditor2],ALLOW_HINT_DISABLE=true)
);
```
#### 2.Auto sharding table rule
-- ##### alter auto sharding table rule
-
```sql
ALTER SHARDING TABLE RULE t_order (
- STORAGE_UNITS(ds_0, ds_1),
- SHARDING_COLUMN=order_id, TYPE(NAME="MOD", PROPERTIES("sharding-count"="4"))
+STORAGE_UNITS(ds_0,ds_1,ds_2,ds_3),
+SHARDING_COLUMN=order_id,TYPE(NAME="hash_mod",PROPERTIES("sharding-count"="16")),
+KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME="snowflake")),
+AUDIT_STRATEGY(AUDITORS=[auditor1,auditor2],ALLOW_HINT_DISABLE=true)
);
```
@@ -183,5 +117,4 @@ ALTER SHARDING TABLE RULE t_order (
### Related links
- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
-- [ALTER SHARDING ALGORITHM](/en/reference/distsql/syntax/rdl/rule-definition/alter-sharding-algorithm/)
- [ALTER DEFAULT_SHARDING STRATEGY](/en/reference/distsql/syntax/rdl/rule-definition/alter-default-sharding-strategy/)
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-reference-rule.cn.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-reference-rule.cn.md
index 2121323cf31..f8225cf54fe 100644
--- a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-reference-rule.cn.md
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-reference-rule.cn.md
@@ -35,19 +35,19 @@ tableName ::=
```sql
-- 创建关联关系之前需要先创建分片表 t_order,t_order_item
-CREATE SHARDING TABLE REFERENCE RULES (t_order,t_order_item);
+CREATE SHARDING TABLE REFERENCE RULE (t_order,t_order_item);
```
#### 2.创建多个关联关系
```sql
-- 创建关联关系之前需要先创建分片表 t_order,t_order_item,t_product,t_product_item
-CREATE SHARDING TABLE REFERENCE RULES (t_order,t_order_item),(t_product,t_product_item);
+CREATE SHARDING TABLE REFERENCE RULE (t_order,t_order_item),(t_product,t_product_item);
```
### 保留字
-`CREATE`、`SHARDING`、`TABLE`、`REFERENCE`、`RULES`
+`CREATE`、`SHARDING`、`TABLE`、`REFERENCE`、`RULE`
### 相关链接
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-reference-rule.en.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-reference-rule.en.md
index c31a5f9da99..2ca3ec089f9 100644
--- a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-reference-rule.en.md
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-reference-rule.en.md
@@ -40,19 +40,19 @@ tableName ::=
```sql
-- Before creating a reference table rule, you need to create sharding table rules t_order, t_order_item
-CREATE SHARDING TABLE REFERENCE RULES (t_order,t_order_item);
+CREATE SHARDING TABLE REFERENCE RULE (t_order,t_order_item);
```
#### 2.Create multiple reference table rules
```sql
-- Before creating reference table rules, you need to create sharding table rules t_order, t_order_item, t_product, t_product_item
-CREATE SHARDING TABLE REFERENCE RULES (t_order,t_order_item),(t_product,t_product_item);
+CREATE SHARDING TABLE REFERENCE RULE (t_order,t_order_item),(t_product,t_product_item);
```
### Reserved word
-`CREATE`, `SHARDING`, `TABLE`, `REFERENCE`, `RULES`
+`CREATE`, `SHARDING`, `TABLE`, `REFERENCE`, `RULE`
### Related links
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.cn.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.cn.md
index 92232319592..c765e85d08b 100644
--- a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.cn.md
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.cn.md
@@ -23,7 +23,7 @@ strategyDefinition ::=
'TYPE' '=' strategyType ',' ( 'SHARDING_COLUMN' | 'SHARDING_COLUMNS' ) '=' columnName ',' algorithmDefinition
keyGenerateStrategyDefinition ::=
- 'KEY_GENERATE_STRATEGY' '(' 'COLUMN' '=' columnName ',' ( 'KEY_GENERATOR' '=' algorihtmName | algorithmDefinition ) ')'
+ 'KEY_GENERATE_STRATEGY' '(' 'COLUMN' '=' columnName ',' algorithmDefinition ')'
auditStrategyDefinition ::=
'AUDIT_STRATEGY' '(' 'AUDITORS' '=' '[' auditorName ',' auditorName ']' ',' 'ALLOW_HINT_DISABLE' '=' 'TRUE | FALSE' ')'
@@ -31,7 +31,7 @@ auditStrategyDefinition ::=
'AUDIT_STRATEGY' '(' '[' 'NAME' '=' auditorName ',' algorithmDefinition ']' ',' '[' 'NAME' '=' auditorName ',' algorithmDefinition ']' ')'
algorithmDefinition ::=
- ('SHARDING_ALGORITHM' '=' algorithmName | 'TYPE' '(' 'NAME' '=' algorithmType ( ',' 'PROPERTIES' '(' propertyDefinition ')' )?')' )
+ 'SHARDING_ALGORITHM' '(' 'TYPE' '(' 'NAME' '=' algorithmType ( ',' 'PROPERTIES' '(' propertyDefinition ')' )?')' ')'
propertyDefinition ::=
( key '=' value ) ( ',' key '=' value )*
@@ -79,90 +79,24 @@ algorithmType ::=
#### 1.标准分片规则
-- ##### 指定分片算法创建标准分片规则
-
-```sql
--- 创建分片算法
-CREATE SHARDING ALGORITHM database_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 2}"))
-), table_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${order_id % 2}"))
-);
-
--- 指定分片算法创建分片规则
-CREATE SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..1}.t_order_${0..1}"),
- DATABASE_STRATEGY(TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM=database_inline),
- TABLE_STRATEGY(TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=table_inline)
-);
-```
-
-- ##### 在默认分库策略下,通过指定分片算法创建标准分片规则
-
```sql
--- 创建分片算法
-CREATE SHARDING ALGORITHM database_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 2}"))
-), table_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${order_id % 2}"))
-);
-
--- 创建默认分库策略
-CREATE DEFAULT SHARDING DATABASE STRATEGY (
- TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=database_inline
-);
-
--- 指定分片算法创建分片规则
-CREATE SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..1}.t_order_${0..1}"),
- TABLE_STRATEGY(TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=table_inline)
-);
-```
-
-- ##### 在默认分库分表策略下,通过指定分片算法创建标准分片规则
-
-```sql
--- 创建分片算法
-CREATE SHARDING ALGORITHM database_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 2}"))
-), table_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${order_id % 2}"))
-);
-
--- 创建默认分库策略
-CREATE DEFAULT SHARDING DATABASE STRATEGY (
- TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=database_inline
-);
-
--- 创建默认分表策略
-CREATE DEFAULT SHARDING TABLE STRATEGY (
- TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=table_inline
-);
-
--- 创建分片规则
-CREATE SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..1}.t_order_${0..1}")
-);
-```
-
-- ##### 创建标准分片规则的同时创建分片算法
-
-```sql
-CREATE SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..1}.t_order_${0..1}"),
- DATABASE_STRATEGY(TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM(TYPE(NAME="inline", PROPERTIES("algorithm-expression"="ds_${user_id % 2}")))),
- TABLE_STRATEGY(TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM(TYPE(NAME="inline", PROPERTIES("algorithm-expression"="ds_${order_id % 2}"))))
+CREATE SHARDING TABLE RULE t_order_item (
+DATANODES("ds_${0..1}.t_order_item_${0..1}"),
+DATABASE_STRATEGY(TYPE="standard",SHARDING_COLUMN=user_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="ds_${user_id % 2}")))),
+TABLE_STRATEGY(TYPE="standard",SHARDING_COLUMN=order_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="t_order_item_${order_id % 2}")))),
+KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME="snowflake")),
+AUDIT_STRATEGY(AUDITORS=[auditor1,auditor2],ALLOW_HINT_DISABLE=true)
);
```
#### 2.自动分片规则
-- ##### 创建自动分片规则
-
```sql
CREATE SHARDING TABLE RULE t_order (
- STORAGE_UNITS(ds_0, ds_1),
- SHARDING_COLUMN=order_id, TYPE(NAME="MOD", PROPERTIES("sharding-count"="4"))
+STORAGE_UNITS(ds_0,ds_1),
+SHARDING_COLUMN=order_id,TYPE(NAME="hash_mod",PROPERTIES("sharding-count"="4")),
+KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME="snowflake")),
+AUDIT_STRATEGY(AUDITORS=[auditor1,auditor2],ALLOW_HINT_DISABLE=true)
);
```
@@ -173,5 +107,4 @@ CREATE SHARDING TABLE RULE t_order (
### 相关链接
- [保留字](/cn/reference/distsql/syntax/reserved-word/)
-- [CREATE SHARDING ALGORITHM](/cn/reference/distsql/syntax/rdl/rule-definition/create-sharding-algorithm/)
- [CREATE DEFAULT_SHARDING STRATEGY](/cn/reference/distsql/syntax/rdl/rule-definition/create-default-sharding-strategy/)
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.en.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.en.md
index f471a99c893..154259f0e33 100644
--- a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.en.md
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/create-sharding-table-rule.en.md
@@ -14,7 +14,7 @@ CreateShardingTableRule ::=
'CREATE' 'SHARDING' 'TABLE' 'RULE' ( tableDefinition | autoTableDefinition ) ( ',' ( tableDefinition | autoTableDefinition ) )*
tableDefinition ::=
- tableName '(' 'DATANODES' '(' dataNode ( ',' dataNode )* ')' ( ',' 'DATABASE_STRATEGY' '(' strategyDefinition ')' )? ( ',' 'TABLE_STRATEGY' '(' strategyDefinition ')' )? ( ',' 'KEY_GENERATE_STRATEGY' '(' keyGenerateStrategyDefinition ')' )? ( ',' 'AUDIT_STRATEGY' '(' auditStrategyDefinition ')' )? ')'
+ tableName '(' 'DATANODES' '(' dataNode ( ',' dataNode )* ')' ( ',' 'DATABASE_STRATEGY' '(' strategyDefinition ')' )? ( ',' 'TABLE_STRATEGY' '(' strategyDefinition ')' )? ( ',' 'KEY_GENERATE_STRATEGY' '(' keyGenerateStrategyDefinition ')' )? ( ',' 'AUDIT_STRATEGY' '(' auditStrategyDefinition ')' )? ')'
autoTableDefinition ::=
tableName '(' 'STORAGE_UNITS' '(' storageUnitName ( ',' storageUnitName )* ')' ',' 'SHARDING_COLUMN' '=' columnName ',' algorithmDefinition ( ',' 'KEY_GENERATE_STRATEGY' '(' keyGenerateStrategyDefinition ')' )? ( ',' 'AUDIT_STRATEGY' '(' auditStrategyDefinition ')' )? ')'
@@ -23,10 +23,15 @@ strategyDefinition ::=
'TYPE' '=' strategyType ',' ( 'SHARDING_COLUMN' | 'SHARDING_COLUMNS' ) '=' columnName ',' algorithmDefinition
keyGenerateStrategyDefinition ::=
- 'KEY_GENERATE_STRATEGY' '(' 'COLUMN' '=' columnName ',' ( 'KEY_GENERATOR' '=' algorihtmName | algorithmDefinition ) ')'
+ 'KEY_GENERATE_STRATEGY' '(' 'COLUMN' '=' columnName ',' algorithmDefinition ')'
+
+auditStrategyDefinition ::=
+ 'AUDIT_STRATEGY' '(' 'AUDITORS' '=' '[' auditorName ',' auditorName ']' ',' 'ALLOW_HINT_DISABLE' '=' 'TRUE | FALSE' ')'
+ |
+ 'AUDIT_STRATEGY' '(' '[' 'NAME' '=' auditorName ',' algorithmDefinition ']' ',' '[' 'NAME' '=' auditorName ',' algorithmDefinition ']' ')'
algorithmDefinition ::=
- ('SHARDING_ALGORITHM' '=' algorithmName | 'TYPE' '(' 'NAME' '=' algorithmType ( ',' 'PROPERTIES' '(' propertyDefinition ')' )?')' )
+ 'SHARDING_ALGORITHM' '(' 'TYPE' '(' 'NAME' '=' algorithmType ( ',' 'PROPERTIES' '(' propertyDefinition ')' )?')' ')'
propertyDefinition ::=
( key '=' value ) ( ',' key '=' value )*
@@ -84,90 +89,24 @@ algorithmType ::=
#### 1.Standard sharding table rule
-- ##### Create standard sharding table rule by specifying sharding algorithms
-
-```SQL
--- create sharding algorithms
-CREATE SHARDING ALGORITHM database_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 2}"))
-), table_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${order_id % 2}"))
-);
-
--- create a sharding rule by specifying sharding algorithms
-CREATE SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..1}.t_order_${0..1}"),
- DATABASE_STRATEGY(TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM=database_inline),
- TABLE_STRATEGY(TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=table_inline)
-);
-```
-
-- ##### Use the default sharding database strategy, create standard sharding table rule by specifying a sharding algorithm
-
-```sql
--- create sharding algorithms
-CREATE SHARDING ALGORITHM database_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 2}"))
-), table_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${order_id % 2}"))
-);
-
--- create a default sharding database strategy
-CREATE DEFAULT SHARDING DATABASE STRATEGY (
- TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=database_inline
-);
-
--- create a sharding table rule by specifying a sharding algorithm
-CREATE SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..1}.t_order_${0..1}"),
- TABLE_STRATEGY(TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=table_inline)
-);
-```
-
-- ##### Use both the default sharding and the default sharding strategy, create standard sharding table rule
-
-```SQL
--- create sharding algorithms
-CREATE SHARDING ALGORITHM database_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${user_id % 2}"))
-), table_inline (
- TYPE(NAME="inline", PROPERTIES("algorithm-expression"="t_order_${order_id % 2}"))
-);
-
--- create a default sharding database strategy
-CREATE DEFAULT SHARDING DATABASE STRATEGY (
- TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=database_inline
-);
-
--- create a default sharding table strategy
-CREATE DEFAULT SHARDING TABLE STRATEGY (
- TYPE="standard", SHARDING_COLUMN=order_id, SHARDING_ALGORITHM=table_inline
-);
-
--- create a sharding table rule
-CREATE SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..1}.t_order_${0..1}")
-);
-```
-
-- ##### Create standard sharding table rule and sharding algorithms at the same time
-
```sql
-CREATE SHARDING TABLE RULE t_order (
- DATANODES("ds_${0..1}.t_order_${0..1}"),
- DATABASE_STRATEGY(TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM(TYPE(NAME="inline", PROPERTIES("algorithm-expression"="ds_${user_id % 2}")))),
- TABLE_STRATEGY(TYPE="standard", SHARDING_COLUMN=user_id, SHARDING_ALGORITHM(TYPE(NAME="inline", PROPERTIES("algorithm-expression"="ds_${order_id % 2}"))))
+CREATE SHARDING TABLE RULE t_order_item (
+DATANODES("ds_${0..1}.t_order_item_${0..1}"),
+DATABASE_STRATEGY(TYPE="standard",SHARDING_COLUMN=user_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="ds_${user_id % 2}")))),
+TABLE_STRATEGY(TYPE="standard",SHARDING_COLUMN=order_id,SHARDING_ALGORITHM(TYPE(NAME="inline",PROPERTIES("algorithm-expression"="t_order_item_${order_id % 2}")))),
+KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME="snowflake")),
+AUDIT_STRATEGY(AUDITORS=[auditor1,auditor2],ALLOW_HINT_DISABLE=true)
);
```
#### 2.Auto sharding table rule
-- ##### create auto sharding table rule
-
```sql
CREATE SHARDING TABLE RULE t_order (
- STORAGE_UNITS(ds_0, ds_1),
- SHARDING_COLUMN=order_id, TYPE(NAME="MOD", PROPERTIES("sharding-count"="4"))
+STORAGE_UNITS(ds_0,ds_1),
+SHARDING_COLUMN=order_id,TYPE(NAME="hash_mod",PROPERTIES("sharding-count"="4")),
+KEY_GENERATE_STRATEGY(COLUMN=another_id,TYPE(NAME="snowflake")),
+AUDIT_STRATEGY(AUDITORS=[auditor1,auditor2],ALLOW_HINT_DISABLE=true)
);
```
@@ -178,5 +117,4 @@ CREATE SHARDING TABLE RULE t_order (
### Related links
- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
-- [CREATE SHARDING ALGORITHM](/en/reference/distsql/syntax/rdl/rule-definition/create-sharding-algorithm/)
- [CREATE DEFAULT_SHARDING STRATEGY](/en/reference/distsql/syntax/rdl/rule-definition/create-default-sharding-strategy/)
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/drop-broadcast-table-rule.cn.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/drop-broadcast-table-rule.cn.md
new file mode 100644
index 00000000000..bbd8ed5011d
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/drop-broadcast-table-rule.cn.md
@@ -0,0 +1,38 @@
++++
+title = "DROP BROADCAST TABLE RULE"
+weight = 17
++++
+
+## 描述
+
+`DROP BROADCAST TABLE RULE` 语法用于为指定的广播表删除广播规则
+
+### 语法定义
+
+```sql
+DropBroadcastTableRule ::=
+ 'DROP' 'BROADCAST' 'TABLE' 'RULE' tableName (',' tableName)*
+
+tableName ::=
+ identifier
+```
+
+### 补充说明
+
+- `tableName` 可使用已经存在的广播规则的表。
+
+### 示例
+
+- 为指定广播表删除广播规则
+
+```sql
+DROP BROADCAST TABLE RULE t_province, t_city;
+```
+
+### 保留字
+
+`DROP`、`BROADCAST`、`TABLE`、`RULE`
+
+### 相关链接
+
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/drop-broadcast-table-rule.en.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/drop-broadcast-table-rule.en.md
new file mode 100644
index 00000000000..1e6a9405cf1
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/drop-broadcast-table-rule.en.md
@@ -0,0 +1,38 @@
++++
+title = "DROP BROADCAST TABLE RULE"
+weight = 17
++++
+
+## Description
+
+The `DROP BROADCAST TABLE RULE` syntax is used to drop broadcast table rule for specified broadcast tables
+
+### Syntax
+
+```sql
+DropBroadcastTableRule ::=
+ 'DROP' 'BROADCAST' 'TABLE' 'RULE' tableName (',' tableName)*
+
+tableName ::=
+ identifier
+```
+
+### Supplement
+
+- `tableName` can use the table of existing broadcast rules
+
+### Example
+
+- Drop broadcast table rule for specified broadcast table
+
+```sql
+DROP BROADCAST TABLE RULE t_province, t_city;
+```
+
+### Reserved word
+
+`DROP`, `BROADCAST`, `TABLE`, `RULE`
+
+### Related links
+
+- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/drop-sharding-table-reference-rule.cn.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/drop-sharding-table-reference-rule.cn.md
new file mode 100644
index 00000000000..ea3dfab6fbd
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/drop-sharding-table-reference-rule.cn.md
@@ -0,0 +1,44 @@
++++
+title = "DROP SHARDING TABLE REFERENCE RULE"
+weight = 15
++++
+
+## 描述
+
+`DROP SHARDING TABLE REFERENCE RULE` 语法用删除指定的关联规则
+
+### 语法定义
+
+```sql
+DropShardingTableReferenceRule ::=
+ 'DROP' 'SHARDING' 'TABLE' 'REFERENCE' 'RULE' (tableName (',' tableName)* )?
+
+tableName ::=
+ identifier
+```
+
+### 补充说明
+
+- 未指定 `SHARDING TABLE REFERENCE RULE` 时,默认删除所有关联规则。
+
+### 示例
+
+- 删除指定关联规则
+
+```sql
+DROP SHARDING TABLE REFERENCE RULE (t_order, t_order_item);
+```
+
+- 删除全部关联规则
+
+```sql
+DROP SHARDING TABLE REFERENCE RULE;
+```
+
+### 保留字
+
+`DROP`、`SHARDING`、`TABLE`、`REFERENCE`、`RULE`
+
+### 相关链接
+
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/drop-sharding-table-reference-rule.en.md b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/drop-sharding-table-reference-rule.en.md
new file mode 100644
index 00000000000..d49067e2c4a
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rdl/rule-definition/sharding/drop-sharding-table-reference-rule.en.md
@@ -0,0 +1,44 @@
++++
+title = "DROP SHARDING TABLE REFERENCE RULE"
+weight = 15
++++
+
+## Description
+
+The `DROP SHARDING TABLE REFERENCE RULE` syntax is used to drop specified sharding table reference rule.
+
+### Syntax
+
+```sql
+DropShardingTableReferenceRule ::=
+ 'DROP' 'SHARDING' 'TABLE' 'REFERENCE' 'RULE' (tableName (',' tableName)* )?
+
+tableName ::=
+ identifier
+```
+
+### Supplement
+
+- When `SHARDING TABLE REFERENCE RULE` is not specified, default is drop all sharding table reference rules.
+
+### Example
+
+- Drop specified sharding table reference rule
+
+```sql
+DROP SHARDING TABLE REFERENCE RULE (t_order, t_order_item);
+```
+
+- Drop all sharding table reference rule
+
+```sql
+DROP SHARDING TABLE REFERENCE RULE;
+```
+
+### Reserved word
+
+`DROP`, `SHARDING`, `TABLE`, `REFERENCE`, `RULE`
+
+### Related links
+
+- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
diff --git a/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.cn.md b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.cn.md
new file mode 100644
index 00000000000..e4effb49724
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.cn.md
@@ -0,0 +1,72 @@
++++
+title = "SHOW SHARDING TABLE REGERENCE RULES"
+weight = 14
+
++++
+
+### 描述
+
+`SHOW SHARDING BINDING TABLE RULES` 语法用于查询指定逻辑库中具有关联关系的分片表
+
+### 语法
+
+```sql
+ShowShardingBindingTableRules::=
+ 'SHOW' 'SHARDING' 'TABLE' 'REFERENCE' 'RULES'('FROM' databaseName)?
+
+databaseName ::=
+ identifier
+```
+
+### 补充说明
+
+- 未指定 `databaseName` 时,默认是当前使用的 `DATABASE`。 如果也未使用 `DATABASE` 则会提示 `No database selected`。
+
+### 返回值说明
+
+| 列 | 说明 |
+| -------------------------| -------------|
+| sharding_table_reference | 关联表名称 |
+
+### 示例
+
+- 查询指定逻辑库中具有关联关系的分片表
+
+```sql
+SHOW SHARDING TABLE REFERENCE RULES FROM test1;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE REFERENCE RULES FROM test1;
++--------------------------+
+| sharding_table_reference |
++--------------------------+
+| t_order,t_order_item |
++--------------------------+
+1 row in set (0.00 sec)
+```
+
+- 查询当前逻辑库中具有绑定关系的分片表
+
+```sql
+SHOW SHARDING TABLE REFERENCE RULES;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE REFERENCE RULES;
++--------------------------+
+| sharding_table_reference |
++--------------------------+
+| t_order,t_order_item |
++--------------------------+
+1 row in set (0.00 sec)
+```
+
+### 保留字
+
+`SHOW`、`SHARDING`、`BINDING`、`TABLE`、`RULES`、`FROM`
+
+### 相关链接
+
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
+
diff --git a/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.en.md b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.en.md
new file mode 100644
index 00000000000..d3ae5d46a72
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rql/rule-query/sharding/show-sharding-table-reference-rules.en.md
@@ -0,0 +1,70 @@
++++
+title = "SHOW SHARDING TABLE REFERENCE RULES"
+weight = 14
++++
+
+### Description
+
+`SHOW SHARDING TABLE REFERENCE RULES` syntax is used to query sharding tables with reference relationships in the specified logical database.
+
+### Syntax
+
+```sql
+ShowShardingBindingTableRules::=
+ 'SHOW' 'SHARDING' 'TABLE' 'REFERENCE' 'RULES'('FROM' databaseName)?
+
+databaseName ::=
+ identifier
+```
+
+### Supplement
+
+- When `databaseName` is not specified, the default is the currently used `DATABASE`. If `DATABASE` is not used, No database selected will be prompted.
+
+### Return value description
+
+| Columns | Descriptions |
+| ------------------------| ------------------------------|
+| sharding_table_reference| sharding reference table list |
+
+### Example
+
+- Query sharding tables with reference relationships for the spicified logical database
+
+```sql
+SHOW SHARDING TABLE REFERENCE RULES FROM test1;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE REFERENCE RULES FROM test1;
++--------------------------+
+| sharding_table_reference |
++--------------------------+
+| t_order,t_order_item |
++--------------------------+
+1 row in set (0.00 sec)
+```
+
+- Query sharding tables with reference relationships for the current logical database
+
+```sql
+SHOW SHARDING TABLE REFERENCE RULES;
+```
+
+```sql
+mysql> SHOW SHARDING TABLE REFERENCE RULES;
++--------------------------+
+| sharding_table_reference |
++--------------------------+
+| t_order,t_order_item |
++--------------------------+
+1 row in set (0.00 sec)
+```
+
+### Reserved word
+
+`SHOW`, `SHARDING`, `TABLE`, `REFERENCE`, `RULES`, `FROM`
+
+### Related links
+
+- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
diff --git a/docs/document/content/reference/distsql/syntax/rul/_index.cn.md b/docs/document/content/reference/distsql/syntax/rul/_index.cn.md
new file mode 100644
index 00000000000..012a930ed8e
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rul/_index.cn.md
@@ -0,0 +1,7 @@
++++
+title = "RUL 语法"
+weight = 4
+chapter = true
++++
+
+RUL (Resource Utility Language) 为 Apache ShardingSphere 的工具类语言,提供 SQL 解析、SQL 格式化、执行计划预览等功能。
diff --git a/docs/document/content/reference/distsql/syntax/rul/_index.en.md b/docs/document/content/reference/distsql/syntax/rul/_index.en.md
new file mode 100644
index 00000000000..deca4ffea6f
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rul/_index.en.md
@@ -0,0 +1,8 @@
++++
+title = "RUL Syntax"
+weight = 4
+chapter = true
+
++++
+
+RUL (Resource Utility Language) responsible for SQL parsing, SQL formatting, preview execution plan and more utility functions.
diff --git a/docs/document/content/reference/distsql/syntax/rul/format-sql.cn.md b/docs/document/content/reference/distsql/syntax/rul/format-sql.cn.md
new file mode 100644
index 00000000000..2825cea514b
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rul/format-sql.cn.md
@@ -0,0 +1,48 @@
++++
+title = "FORMAT SQL"
+weight = 2
++++
+
+### 描述
+
+`FORMAT SQL` 语法用于解析并输出格式化后的 `SQL` 语句
+
+### 语法
+
+```sql
+FormatSql ::=
+ 'FORMAT' sqlStatement
+```
+
+### 返回值说明
+
+| 列 | 说明 |
+|--------------------------|------------------|
+| formatted_result | 格式化后的SQL语句 |
+
+### 示例
+
+- 解析并输出格式化后的 `SQL` 语句
+
+```sql
+FORMAT SELECT * FROM t_order;
+```
+
+```sql
+mysql> FORMAT SELECT * FROM t_order;
++-------------------------+
+| formatted_result |
++-------------------------+
+| SELECT *
+FROM t_order; |
++-------------------------+
+1 row in set (0.00 sec)
+```
+
+### 保留字
+
+`FORMAT`
+
+### 相关链接
+
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/rul/format-sql.en.md b/docs/document/content/reference/distsql/syntax/rul/format-sql.en.md
new file mode 100644
index 00000000000..f6f8879fbc0
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rul/format-sql.en.md
@@ -0,0 +1,48 @@
++++
+title = "FORMAT SQL"
+weight = 2
++++
+
+### Description
+
+The `FORMAT SQL` syntax is used to parse `SQL` and output formated `SQL` statement.
+
+### Syntax
+
+```sql
+ParseSql ::=
+ 'FORMAT' sqlStatement
+```
+
+### Return Value Description
+
+| Column | Description |
+|--------------------------|---------------------------|
+| formatted_result | formated SQL statement |
+
+### Example
+
+- Parse `SQL` and output formated `SQL` statement
+
+```sql
+FORMAT SELECT * FROM t_order;
+```
+
+```sql
+mysql> FORMAT SELECT * FROM t_order;
++-------------------------+
+| formatted_result |
++-------------------------+
+| SELECT *
+FROM t_order; |
++-------------------------+
+1 row in set (0.00 sec)
+```
+
+### Reserved word
+
+`FORMAT`
+
+### Related links
+
+- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
diff --git a/docs/document/content/reference/distsql/syntax/rul/parse-sql.cn.md b/docs/document/content/reference/distsql/syntax/rul/parse-sql.cn.md
new file mode 100644
index 00000000000..ed8f757676c
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rul/parse-sql.cn.md
@@ -0,0 +1,48 @@
++++
+title = "PARSE SQL"
+weight = 1
++++
+
+### 描述
+
+`PARSE SQL` 语法用于解析 `SQL` 并输出抽象语法树
+
+### 语法
+
+```sql
+ParseSql ::=
+ 'PARSE' sqlStatement
+```
+
+### 返回值说明
+
+| 列 | 说明 |
+|--------------------------|----------------|
+| parsed_statement | 解析SQL语句类型 |
+| parsed_statement_detail | 解析SQL语句细节 |
+
+### 示例
+
+- 解析 `SQL` 并输出抽象语法树
+
+```sql
+PARSE SELECT * FROM t_order;
+```
+
+```sql
+mysql> PARSE SELECT * FROM t_order;
++----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| parsed_statement | parsed_statement_detail |
++----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| MySQLSelectStatement | {"projections":{"startIndex":7,"stopIndex":7,"projections":[{"startIndex":7,"stopIndex":7}],"distinctRow":false},"from":{"tableName":{"startIndex":14,"stopIndex":20,"identifier":{"value":"t_order","quoteCharacter":"NONE"}}},"parameterCount":0,"parameterMarkerSegments":[],"commentSegments":[]} |
++----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+1 row in set (0.01 sec)
+```
+
+### 保留字
+
+`PARSE`
+
+### 相关链接
+
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/rul/parse-sql.en.md b/docs/document/content/reference/distsql/syntax/rul/parse-sql.en.md
new file mode 100644
index 00000000000..7a11d317236
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rul/parse-sql.en.md
@@ -0,0 +1,48 @@
++++
+title = "PARSE SQL"
+weight = 1
++++
+
+### Description
+
+The `PARSE SQL` syntax is used to parse `SQL` and output abstract syntax tree.
+
+### Syntax
+
+```sql
+ParseSql ::=
+ 'PARSE' sqlStatement
+```
+
+### Return Value Description
+
+| Column | Description |
+|--------------------------|---------------------------------|
+| parsed_statement | parsed SQL statement type |
+| parsed_statement_detail | detail of the parsed statement |
+
+### Example
+
+- Parse `SQL` and output abstract syntax tree
+
+```sql
+PARSE SELECT * FROM t_order;
+```
+
+```sql
+mysql> PARSE SELECT * FROM t_order;
++----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| parsed_statement | parsed_statement_detail |
++----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+| MySQLSelectStatement | {"projections":{"startIndex":7,"stopIndex":7,"projections":[{"startIndex":7,"stopIndex":7}],"distinctRow":false},"from":{"tableName":{"startIndex":14,"stopIndex":20,"identifier":{"value":"t_order","quoteCharacter":"NONE"}}},"parameterCount":0,"parameterMarkerSegments":[],"commentSegments":[]} |
++----------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
+1 row in set (0.01 sec)
+```
+
+### Reserved word
+
+`PARSE`
+
+### Related links
+
+- [Reserved word](/en/reference/distsql/syntax/reserved-word/)
diff --git a/docs/document/content/reference/distsql/syntax/rul/preview-sql.cn.md b/docs/document/content/reference/distsql/syntax/rul/preview-sql.cn.md
new file mode 100644
index 00000000000..3ed64d2f581
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rul/preview-sql.cn.md
@@ -0,0 +1,48 @@
++++
+title = "PREVIEW SQL"
+weight = 3
++++
+
+### 描述
+
+`PREVIEW SQL` 语法用于预览 `SQL` 执行计划
+
+### 语法
+
+```sql
+PreviewSql ::=
+ 'PREVIEW' sqlStatement
+```
+
+### 返回值说明
+
+| 列 | 说明 |
+|-------------------|------------------|
+| data_source_name | 存储单元名称 |
+| actual_sql | 实际执行 SQL 语句 |
+
+### 示例
+
+- 预览 `SQL` 执行计划
+
+```sql
+PREVIEW SELECT * FROM t_order;
+```
+
+```sql
+mysql> PREVIEW SELECT * FROM t_order;
++------------------+-----------------------+
+| data_source_name | actual_sql |
++------------------+-----------------------+
+| su_1 | SELECT * FROM t_order |
++------------------+-----------------------+
+1 row in set (0.18 sec)
+```
+
+### 保留字
+
+`PREVIEW`
+
+### 相关链接
+
+- [保留字](/cn/reference/distsql/syntax/reserved-word/)
\ No newline at end of file
diff --git a/docs/document/content/reference/distsql/syntax/rul/preview-sql.en.md b/docs/document/content/reference/distsql/syntax/rul/preview-sql.en.md
new file mode 100644
index 00000000000..aa012864b25
--- /dev/null
+++ b/docs/document/content/reference/distsql/syntax/rul/preview-sql.en.md
@@ -0,0 +1,48 @@
++++
+title = "PREVIEW SQL"
+weight = 3
++++
+
+### Description
+
+The `PREVIEW SQL` syntax is used to preview `SQL` execution plan.
+
+### Syntax
+
+```sql
+PreviewSql ::=
+ 'PREVIEW' sqlStatement
+```
+
+### Return Value Description
+
+| Column | Description |
+|--------------------------|-----------------------------|
+| data_source_name | storage unit name |
+| actual_sql | actual excute SQL statement |
+
+### Example
+
+- Preview `SQL` execution plan
+
+```sql
+PREVIEW SELECT * FROM t_order;
+```
+
+```sql
+mysql> PREVIEW SELECT * FROM t_order;
++------------------+-----------------------+
+| data_source_name | actual_sql |
++------------------+-----------------------+
+| su_1 | SELECT * FROM t_order |
++------------------+-----------------------+
+1 row in set (0.18 sec)
+```
+
+### Reserved word
+
+`PREVIEW`
+
+### Related links
+
+- [Reserved word](/en/reference/distsql/syntax/reserved-word/)