Merge pull request #2894 from taosdata/liuyq-617-patch-1

Update Model-ch.md
This commit is contained in:
Xiao Ping 2020-08-03 14:28:02 +08:00 committed by GitHub
commit e5b15715fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -13,6 +13,14 @@ CREATE DATABASE power KEEP 365 DAYS 10 REPLICA 3 BLOCKS 4;
```
上述语句将创建一个名为power的库这个库的数据将保留365天超过365天将被自动删除每10天一个数据文件副本数为3, 内存块数为4。详细的语法及参数请见<a href="https://www.taosdata.com/cn/documentation20/taos-sql/">TAOS SQL</a>
创建库之后需要使用SQL命令USE将当前库切换过来例如
```cmd
USE power;
```
就当当前链接里操作的库换为power否则对具体表操作前需要使用“库名.表名”来指定库的名字。
**注意:**
- 任何一张表或超级表是属于一个库的,在创建表之前,必须先创建库。