diff --git a/documentation/tdenginedocs-cn/super-table/index.html b/documentation/tdenginedocs-cn/super-table/index.html index 2695f80aea2a325a78c1fa3a48c77ce11b0b5157..c4f1d5b9136aa2cae2000fe01fd25ace7bfee582 100644 --- a/documentation/tdenginedocs-cn/super-table/index.html +++ b/documentation/tdenginedocs-cn/super-table/index.html @@ -74,7 +74,7 @@ tags (location binary(20), type int)
修改超级表的标签名,从超级表修改某个标签名后,该超级表下的所有子表也会自动更新该标签名。
修改子表的标签值
-ALTER TABLE <table_name> SET <tag_name>=<new_tag_value>
+ALTER TABLE <table_name> SET TAG <tag_name>=<new_tag_value>
systemctl start taosd
Then check if the server is working now.
systemctl status taosd
-If the service is running successfully, you can play around though TDengine shell taos
, the command line interface tool located in directory /usr/local/bin/taos
If the service is running successfully, you can play around through TDengine shell taos
, the command line interface tool located in directory /usr/local/bin/taos
Note: The systemctl command needs the root privilege. Use sudo if you are not the root user.
To launch TDengine shell, the command line interface, in a Linux terminal, type:
diff --git a/documentation/tdenginedocs-en/super-table/index.html b/documentation/tdenginedocs-en/super-table/index.html index 9813e77c960e65ca9ecc8e265eaf3a76eaecebee..8eeefb62529bc6faa4b073569066be5effecdec2 100644 --- a/documentation/tdenginedocs-en/super-table/index.html +++ b/documentation/tdenginedocs-en/super-table/index.html @@ -67,40 +67,31 @@ INTERVAL(10M)After you can create a STable, you can describe, delete, change STables. This section lists all the supported operations.
show stables;
-
+show stables;
It lists all STables in current DB, including the name, created time, number of fileds, number of tags, and number of tables which are created via this STable.
DESCRIBE <stable_name>
-
+DESCRIBE <stable_name>
It lists the STable's schema and tags
DROP TABLE <stable_name>
-
+DROP TABLE <stable_name>
To delete a STable, all the tables created via this STable shall be deleted first, otherwise, it will fail.
SELECT TBNAME,[TAG_NAME,…] FROM <stable_name> WHERE <tag_name> <[=|=<|>=|<>] values..> ([AND|OR] …)
-
+SELECT TBNAME,[TAG_NAME,…] FROM <stable_name> WHERE <tag_name> <[=|=<|>=|<>] values..> ([AND|OR] …)
It will list all the tables which satisfy the tag filter conditions. The tables are all created from this specific STable. TBNAME is a new keyword introduced, it is the table name associated with the STable.
-SELECT COUNT(TBNAME) FROM <stable_name> WHERE <tag_name> <[=|=<|>=|<>] values..> ([AND|OR] …)
-
+SELECT COUNT(TBNAME) FROM <stable_name> WHERE <tag_name> <[=|=<|>=|<>] values..> ([AND|OR] …)
The above SQL statement will list the number of tables in a STable, which satisfy the filter condition.
You can add, delete and change the tags for a STable, and you can change the tag value of a table. The SQL commands are listed below.
ALTER TABLE <stable_name> ADD TAG <new_tag_name> <TYPE>
-
+ALTER TABLE <stable_name> ADD TAG <new_tag_name> <TYPE>
It adds a new tag to the STable with a data type. The maximum number of tags is 6.
ALTER TABLE <stable_name> DROP TAG <tag_name>
-
+ALTER TABLE <stable_name> DROP TAG <tag_name>
It drops a tag from a STable. The first tag could not be deleted, and there must be at least one tag.
ALTER TABLE <stable_name> CHANGE TAG <old_tag_name> <new_tag_name>
-
+ALTER TABLE <stable_name> CHANGE TAG <old_tag_name> <new_tag_name>
It changes the name of a tag from old to new.
ALTER TABLE <table_name> SET <tag_name>=<new_tag_value>
-
+ALTER TABLE <table_name> SET TAG <tag_name>=<new_tag_value>
It changes a table's tag value to a new one.
Back