From 7775e110042d292fb2e852f6d31f8153cd4e499c Mon Sep 17 00:00:00 2001 From: W1y1r <2730956796@qq.com> Date: Mon, 24 Mar 2025 18:21:31 +0800 Subject: [PATCH] Write and modify database documents --- .../Basic-Concept/Database-Management.md | 20 +++++++++++++++++-- .../Basic-Concept/Database-Management.md | 20 +++++++++++++++++-- .../Basic-Concept/Database-Management.md | 20 +++++++++++++++++-- .../Basic-Concept/Database-Management.md | 20 +++++++++++++++++-- 4 files changed, 72 insertions(+), 8 deletions(-) diff --git a/src/UserGuide/Master/Table/Basic-Concept/Database-Management.md b/src/UserGuide/Master/Table/Basic-Concept/Database-Management.md index 24771500b..163a055fa 100644 --- a/src/UserGuide/Master/Table/Basic-Concept/Database-Management.md +++ b/src/UserGuide/Master/Table/Basic-Concept/Database-Management.md @@ -41,7 +41,7 @@ This command is used to create a database. - Maximum length is 64 characters. - Names with special characters or Chinese characters must be enclosed in double quotes (`""`). -2. `WITH properties`: Property names are case-insensitive and currently cannot be modified. For more details, refer to the case sensitivity rules [case-sensitivity](../SQL-Manual/Identifier.md#2-case-sensitivity)。Configurable properties include: +2. `WITH properties`: Property names are case-insensitive. For more details, refer to the case sensitivity rules [case-sensitivity](../SQL-Manual/Identifier.md#2-case-sensitivity)。Configurable properties include: | Property | Description | Default Value | | ----------------------- | ------------------------------------------------------------ | -------------------- | @@ -149,7 +149,23 @@ IoTDB> show databases details ### 1.5 Update a Database -Currently not supported; will be available after version 2.0.2.1. +Used to modify some attributes in the database. + +**Syntax:** + +```SQL +ALTER DATABASE (IF EXISTS)? databaseName=qualifiedName (WITH properties)? +``` + +**Note:** + +1. The `ALTER DATABASE` operation currently only supports modifications to the database's `SCHEMA_REGION_GROUP_NUM`, `DATA_REGION_GROUP_NUM`, and `TTL` attributes. + +**Example:** + +```SQL +ALTER TABLE database1 with(TTL=31536000000); +``` ### 1.6 Delete a Database diff --git a/src/UserGuide/latest-Table/Basic-Concept/Database-Management.md b/src/UserGuide/latest-Table/Basic-Concept/Database-Management.md index 24771500b..163a055fa 100644 --- a/src/UserGuide/latest-Table/Basic-Concept/Database-Management.md +++ b/src/UserGuide/latest-Table/Basic-Concept/Database-Management.md @@ -41,7 +41,7 @@ This command is used to create a database. - Maximum length is 64 characters. - Names with special characters or Chinese characters must be enclosed in double quotes (`""`). -2. `WITH properties`: Property names are case-insensitive and currently cannot be modified. For more details, refer to the case sensitivity rules [case-sensitivity](../SQL-Manual/Identifier.md#2-case-sensitivity)。Configurable properties include: +2. `WITH properties`: Property names are case-insensitive. For more details, refer to the case sensitivity rules [case-sensitivity](../SQL-Manual/Identifier.md#2-case-sensitivity)。Configurable properties include: | Property | Description | Default Value | | ----------------------- | ------------------------------------------------------------ | -------------------- | @@ -149,7 +149,23 @@ IoTDB> show databases details ### 1.5 Update a Database -Currently not supported; will be available after version 2.0.2.1. +Used to modify some attributes in the database. + +**Syntax:** + +```SQL +ALTER DATABASE (IF EXISTS)? databaseName=qualifiedName (WITH properties)? +``` + +**Note:** + +1. The `ALTER DATABASE` operation currently only supports modifications to the database's `SCHEMA_REGION_GROUP_NUM`, `DATA_REGION_GROUP_NUM`, and `TTL` attributes. + +**Example:** + +```SQL +ALTER TABLE database1 with(TTL=31536000000); +``` ### 1.6 Delete a Database diff --git a/src/zh/UserGuide/Master/Table/Basic-Concept/Database-Management.md b/src/zh/UserGuide/Master/Table/Basic-Concept/Database-Management.md index be6b7972a..1360c0884 100644 --- a/src/zh/UserGuide/Master/Table/Basic-Concept/Database-Management.md +++ b/src/zh/UserGuide/Master/Table/Basic-Concept/Database-Management.md @@ -43,7 +43,7 @@ 2. WITH properties 子句可配置如下属性: -> 注:属性的大小写不敏感,且暂不支持修改,有关详细信息[大小写敏感规则](../SQL-Manual/Identifier.md#大小写敏感性)。 +> 注:属性的大小写不敏感,有关详细信息[大小写敏感规则](../SQL-Manual/Identifier.md#大小写敏感性)。 | 属性 | 含义 | 默认值 | | ------------------------- | ---------------------------------------- | --------- | @@ -151,7 +151,23 @@ IoTDB> show databases details ### 1.5 修改数据库 -暂不支持,V2.0.2.1后支持 +用于修改数据库中的部分属性。 + +**语法:** + +```SQL +ALTER DATABASE (IF EXISTS)? databaseName=qualifiedName (WITH properties)? +``` + +**说明:** + +1. `ALTER DATABASE`操作目前仅支持对数据库的`SCHEMA_REGION_GROUP_NUM`、`DATA_REGION_GROUP_NUM`以及`TTL`属性进行修改。 + +**示例:** + +```SQL +ALTER TABLE database1 with(TTL=31536000000); +``` ### 1.6 删除数据库 diff --git a/src/zh/UserGuide/latest-Table/Basic-Concept/Database-Management.md b/src/zh/UserGuide/latest-Table/Basic-Concept/Database-Management.md index be6b7972a..1360c0884 100644 --- a/src/zh/UserGuide/latest-Table/Basic-Concept/Database-Management.md +++ b/src/zh/UserGuide/latest-Table/Basic-Concept/Database-Management.md @@ -43,7 +43,7 @@ 2. WITH properties 子句可配置如下属性: -> 注:属性的大小写不敏感,且暂不支持修改,有关详细信息[大小写敏感规则](../SQL-Manual/Identifier.md#大小写敏感性)。 +> 注:属性的大小写不敏感,有关详细信息[大小写敏感规则](../SQL-Manual/Identifier.md#大小写敏感性)。 | 属性 | 含义 | 默认值 | | ------------------------- | ---------------------------------------- | --------- | @@ -151,7 +151,23 @@ IoTDB> show databases details ### 1.5 修改数据库 -暂不支持,V2.0.2.1后支持 +用于修改数据库中的部分属性。 + +**语法:** + +```SQL +ALTER DATABASE (IF EXISTS)? databaseName=qualifiedName (WITH properties)? +``` + +**说明:** + +1. `ALTER DATABASE`操作目前仅支持对数据库的`SCHEMA_REGION_GROUP_NUM`、`DATA_REGION_GROUP_NUM`以及`TTL`属性进行修改。 + +**示例:** + +```SQL +ALTER TABLE database1 with(TTL=31536000000); +``` ### 1.6 删除数据库