20-keywords.md 3.7 KB
Newer Older
1 2 3 4 5 6
---
title: Keywords
---

There are about 200 keywords reserved by TDengine, they can't be used as the name of database, STable or table with either upper case, lower case or mixed case.

7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
## Keywords List

### A

- ABORT
- ACCOUNT
- ACCOUNTS
- ADD
- AFTER
- ALL
- ALTER
- AND
- AS
- ASC
- ATTACH

### B

- BEFORE
- BEGIN
- BETWEEN
- BIGINT
- BINARY
- BITAND
- BITNOT
- BITOR
- BLOCKS
- BOOL
- BY

### C

- CACHE
- CACHELAST
- CASCADE
- CHANGE
- CLUSTER
- COLON
- COLUMN
- COMMA
- COMP
- COMPACT
- CONCAT
- CONFLICT
- CONNECTION
- CONNECTIONS
- CONNS
- COPY
- CREATE
- CTIME

### D

- DATABASE  
- DATABASES 
- DAYS      
- DBS       
- DEFERRED  
- DELETE
- DELIMITERS
- DESC      
- DESCRIBE  
- DETACH    
- DISTINCT  
- DIVIDE    
- DNODE     
- DNODES    
- DOT       
- DOUBLE    
- DROP  

### E

- END     
- EQ      
- EXISTS  
- EXPLAIN 

### F

- FAIL   
- FILE   
- FILL   
- FLOAT  
- FOR    
- FROM   
- FSYNC  

### G

- GE    
- GLOB  
- GRANTS
- GROUP 
- GT  

### H

- HAVING 

### I

- ID
- IF
- IGNORE 
- IMMEDIA
- IMPORT 
- IN     
- INITIAL
- INSERT 
- INSTEAD
- INT    
- INTEGER
- INTERVA
- INTO   
- IS     
- ISNULL 

### J

- JOIN

### K

- KEEP
- KEY 
- KILL

### L

- LE    
- LIKE  
- LIMIT 
- LINEAR
- LOCAL 
- LP    
- LSHIFT
- LT 

### M

- MATCH    
- MAXROWS  
- MINROWS  
- MINUS    
- MNODES   
- MODIFY   
- MODULES  

### N

- NE     
- NONE   
- NOT    
- NOTNULL
- NOW    
- NULL

### O

- OF    
- OFFSET
- OR    
- ORDER 

### P

- PARTITION
- PASS     
- PLUS     
- PPS      
- PRECISION
- PREV     
- PRIVILEGE

### Q

- QTIME 
- QUERIE
- QUERY 
- QUORUM

### R

- RAISE  
- REM    
- REPLACE
- REPLICA
- RESET  
- RESTRIC
- ROW    
- RP     
- RSHIFT

### S

- SCORES 
- SELECT 
- SEMI   
- SESSION
- SET    
- SHOW   
- SLASH  
- SLIDING
- SLIMIT 
- SMALLIN
- SOFFSET
- STable 
- STableS
- STAR    
- STATE   
- STATEMEN
- STATE_WI
- STORAGE 
- STREAM  
- STREAMS 
- STRING  
- SYNCDB  

### T

- TABLE     
- TABLES    
- TAG       
- TAGS      
- TBNAME    
- TIMES     
- TIMESTAMP 
- TINYINT   
- TOPIC     
- TOPICS    
- TRIGGER   
- TSERIES   

### U

- UMINUS   
- UNION    
- UNSIGNED 
- UPDATE   
- UPLUS    
- USE      
- USER     
- USERS    
- USING  

### V

- VALUES   
- VARIABLE 
- VARIABLES
- VGROUPS  
- VIEW     
- VNODES   

### W

- WAL
- WHERE

### _

- _C0
- _QSTART
- _QSTOP
- _QDURATION
- _WSTART
- _WSTOP
- _WDURATION
276 277 278

## Explanations
### TBNAME
G
gccgdb1234 已提交
279
`TBNAME` can be considered as a special tag, which represents the name of the subtable, in a STable.
280 281 282 283

Get the table name and tag values of all subtables in a STable.
```mysql
SELECT TBNAME, location FROM meters;
B
Bo Ding 已提交
284
```
285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308

Count the number of subtables in a STable.
```mysql
SELECT COUNT(TBNAME) FROM meters;
```

Only filter on TAGS can be used in WHERE clause in the above two query statements.
```mysql
taos> SELECT TBNAME, location FROM meters;
             tbname             |            location            |
==================================================================
 d1004                          | California.SanFrancisco        |
 d1003                          | California.SanFrancisco        |
 d1002                          | California.LosAngeles          |
 d1001                          | California.LosAngeles          |
Query OK, 4 row(s) in set (0.000881s)

taos> SELECT COUNT(tbname) FROM meters WHERE groupId > 2;
     count(tbname)     |
========================
                     2 |
Query OK, 1 row(s) in set (0.001091s)
```
### _QSTART/_QSTOP/_QDURATION
W
wade zhang 已提交
309
The start, stop and duration of a query time window.
310 311

### _WSTART/_WSTOP/_WDURATION
W
wade zhang 已提交
312
The start, stop and duration of aggegate query by time window, like interval, session window, state window.
313

G
gccgdb1234 已提交
314
### _c0/_ROWTS
W
wade zhang 已提交
315
_c0 is equal to _ROWTS, it means the first column of a table or STable.