diff --git a/documentation20/cn/11.administrator/docs.md b/documentation20/cn/11.administrator/docs.md index 10951ed1fbd7185b3944276fc393e59f352e05ef..dce2f50d9eea8e517113d2c7346f6f9933f13cce 100644 --- a/documentation20/cn/11.administrator/docs.md +++ b/documentation20/cn/11.administrator/docs.md @@ -465,43 +465,44 @@ TDengine的所有可执行文件默认存放在 _/usr/local/taos/bin_ 目录下 目前 TDengine 有将近 200 个内部保留关键字,这些关键字无论大小写均不可以用作库名、表名、STable 名、数据列名及标签列名等。这些关键字列表如下: -| 关键字列表 | | | | | -| ---------- | ----------- | ------------ | ---------- | --------- | -| ABLOCKS | CONNECTIONS | HAVING | MODULES | SMALLINT | -| ABORT | COPY | ID | NCHAR | SPREAD | -| ACCOUNT | COUNT | IF | NE | STABLE | -| ACCOUNTS | CREATE | IGNORE | NONE | STABLES | -| ADD | CTIME | IMMEDIATE | NOT | STAR | -| AFTER | DATABASE | IMPORT | NOTNULL | STATEMENT | -| ALL | DATABASES | IN | NOW | STDDEV | -| ALTER | DAYS | INITIALLY | OF | STREAM | -| AND | DEFERRED | INSERT | OFFSET | STREAMS | -| AS | DELIMITERS | INSTEAD | OR | STRING | -| ASC | DESC | INTEGER | ORDER | SUM | -| ATTACH | DESCRIBE | INTERVAL | PASS | TABLE | -| AVG | DETACH | INTO | PERCENTILE | TABLES | -| BEFORE | DIFF | IP | PLUS | TAG | -| BEGIN | DISTINCT | IS | PRAGMA | TAGS | -| BETWEEN | DIVIDE | ISNULL | PREV | TBLOCKS | -| BIGINT | DNODE | JOIN | PRIVILEGE | TBNAME | -| BINARY | DNODES | KEEP | QUERIES | TIMES | -| BITAND | DOT | KEY | QUERY | TIMESTAMP | -| BITNOT | DOUBLE | KILL | RAISE | TINYINT | -| BITOR | DROP | LAST | REM | TOP | -| BOOL | EACH | LE | REPLACE | TOPIC | -| BOTTOM | END | LEASTSQUARES | REPLICA | TRIGGER | -| BY | EQ | LIKE | RESET | UMINUS | -| CACHE | EXISTS | LIMIT | RESTRICT | UNION | -| CASCADE | EXPLAIN | LINEAR | ROW | UPLUS | -| CHANGE | FAIL | LOCAL | ROWS | USE | -| CLOG | FILL | LP | RP | USER | -| CLUSTER | FIRST | LSHIFT | RSHIFT | USERS | -| COLON | FLOAT | LT | SCORES | USING | -| COLUMN | FOR | MATCH | SELECT | VALUES | -| COMMA | FROM | MAX | SEMI | VARIABLE | -| COMP | GE | METRIC | SET | VGROUPS | -| CONCAT | GLOB | METRICS | SHOW | VIEW | -| CONFIGS | GRANTS | MIN | SLASH | WAVG | -| CONFLICT | GROUP | MINUS | SLIDING | WHERE | -| CONNECTION | GT | MNODES | SLIMIT | | +| 关键字列表 | | | | | +| ------------ | ------------ | ------------ | ------------ | ------------ | +| ABORT | CREATE | IGNORE | NULL | STAR | +| ACCOUNT | CTIME | IMMEDIATE | OF | STATE | +| ACCOUNTS | DATABASE | IMPORT | OFFSET | STATEMENT | +| ADD | DATABASES | IN | OR | STATE_WINDOW | +| AFTER | DAYS | INITIALLY | ORDER | STORAGE | +| ALL | DBS | INSERT | PARTITIONS | STREAM | +| ALTER | DEFERRED | INSTEAD | PASS | STREAMS | +| AND | DELIMITERS | INT | PLUS | STRING | +| AS | DESC | INTEGER | PPS | SYNCDB | +| ASC | DESCRIBE | INTERVAL | PRECISION | TABLE | +| ATTACH | DETACH | INTO | PREV | TABLES | +| BEFORE | DISTINCT | IS | PRIVILEGE | TAG | +| BEGIN | DIVIDE | ISNULL | QTIME | TAGS | +| BETWEEN | DNODE | JOIN | QUERIES | TBNAME | +| BIGINT | DNODES | KEEP | QUERY | TIMES | +| BINARY | DOT | KEY | QUORUM | TIMESTAMP | +| BITAND | DOUBLE | KILL | RAISE | TINYINT | +| BITNOT | DROP | LE | REM | TOPIC | +| BITOR | EACH | LIKE | REPLACE | TOPICS | +| BLOCKS | END | LIMIT | REPLICA | TRIGGER | +| BOOL | EQ | LINEAR | RESET | TSERIES | +| BY | EXISTS | LOCAL | RESTRICT | UMINUS | +| CACHE | EXPLAIN | LP | ROW | UNION | +| CACHELAST | FAIL | LSHIFT | RP | UNSIGNED | +| CASCADE | FILE | LT | RSHIFT | UPDATE | +| CHANGE | FILL | MATCH | SCORES | UPLUS | +| CLUSTER | FLOAT | MAXROWS | SELECT | USE | +| COLON | FOR | MINROWS | SEMI | USER | +| COLUMN | FROM | MINUS | SESSION | USERS | +| COMMA | FSYNC | MNODES | SET | USING | +| COMP | GE | MODIFY | SHOW | VALUES | +| COMPACT | GLOB | MODULES | SLASH | VARIABLE | +| CONCAT | GRANTS | NCHAR | SLIDING | VARIABLES | +| CONFLICT | GROUP | NE | SLIMIT | VGROUPS | +| CONNECTION | GT | NONE | SMALLINT | VIEW | +| CONNECTIONS | HAVING | NOT | SOFFSET | VNODES | +| CONNS | ID | NOTNULL | STABLE | WAL | +| COPY | IF | NOW | STABLES | WHERE | diff --git a/documentation20/cn/12.taos-sql/docs.md b/documentation20/cn/12.taos-sql/docs.md index 844865f6dbf67bc5031ea2556ac0e937ac965898..2a1112fd16d9c1f7e25f6abc116116b4012e1a7f 100644 --- a/documentation20/cn/12.taos-sql/docs.md +++ b/documentation20/cn/12.taos-sql/docs.md @@ -89,13 +89,13 @@ TDengine 缺省的时间戳是毫秒精度,但通过在 CREATE DATABASE 时传 ```mysql USE db_name; ``` - 使用/切换数据库 + 使用/切换数据库(在 RESTful 连接方式下无效)。 - **删除数据库** ```mysql DROP DATABASE [IF EXISTS] db_name; ``` - 删除数据库。所包含的全部数据表将被删除,谨慎使用 + 删除数据库。指定 Database 所包含的全部数据表将被删除,谨慎使用! - **修改数据库参数** ```mysql @@ -703,22 +703,24 @@ Query OK, 1 row(s) in set (0.001091s) ### 支持的条件过滤操作 -| **Operation** | **Note** | **Applicable Data Types** | -| --------------- | ----------------------------- | ------------------------------------- | -| > | larger than | **`timestamp`** and all numeric types | -| < | smaller than | **`timestamp`** and all numeric types | -| >= | larger than or equal to | **`timestamp`** and all numeric types | -| <= | smaller than or equal to | **`timestamp`** and all numeric types | -| = | equal to | all types | -| <> | not equal to | all types | -| between and | within a certain range | **`timestamp`** and all numeric types | -| % | match with any char sequences | **`binary`** **`nchar`** | -| _ | match with a single char | **`binary`** **`nchar`** | +| **Operation** | **Note** | **Applicable Data Types** | +| --------------- | ----------------------------- | ----------------------------------------- | +| > | larger than | **`timestamp`** and all numeric types | +| < | smaller than | **`timestamp`** and all numeric types | +| >= | larger than or equal to | **`timestamp`** and all numeric types | +| <= | smaller than or equal to | **`timestamp`** and all numeric types | +| = | equal to | all types | +| <> | not equal to | all types | +| between and | within a certain range | **`timestamp`** and all numeric types | +| in | matches any value in a set | all types except first column `timestamp` | +| % | match with any char sequences | **`binary`** **`nchar`** | +| _ | match with a single char | **`binary`** **`nchar`** | 1. <> 算子也可以写为 != ,请注意,这个算子不能用于数据表第一列的 timestamp 字段。 2. 同时进行多个字段的范围过滤,需要使用关键词 AND 来连接不同的查询条件,暂不支持 OR 连接的不同列之间的查询过滤条件。 -3. 针对单一字段的过滤,如果是时间过滤条件,则一条语句中只支持设定一个;但针对其他的(普通)列或标签列,则可以使用 `OR` 关键字进行组合条件的查询过滤。例如:((value > 20 AND value < 30) OR (value < 12)) 。 -4. 从 2.0.17 版本开始,条件过滤开始支持 BETWEEN AND 语法,例如 `WHERE col2 BETWEEN 1.5 AND 3.25` 表示查询条件为“1.5 ≤ col2 ≤ 3.25”。 +3. 针对单一字段的过滤,如果是时间过滤条件,则一条语句中只支持设定一个;但针对其他的(普通)列或标签列,则可以使用 `OR` 关键字进行组合条件的查询过滤。例如: `((value > 20 AND value < 30) OR (value < 12))`。 +4. 从 2.0.17.0 版本开始,条件过滤开始支持 BETWEEN AND 语法,例如 `WHERE col2 BETWEEN 1.5 AND 3.25` 表示查询条件为“1.5 ≤ col2 ≤ 3.25”。 +5. 从 2.1.4.0 版本开始,条件过滤开始支持 IN 算子,例如 `WHERE city IN ('Beijing', 'Shanghai')`。说明:BOOL 类型写作 `{true, false}` 或 `{0, 1}` 均可,但不能写作 0、1 之外的整数;FLOAT 和 DOUBLE 类型会受到浮点数精度影响,集合内的值在精度范围内认为和数据行的值完全相等才能匹配成功。