doc: select tags to retrieve tags

This commit is contained in:
shenglian zhou 2023-12-19 08:53:45 +08:00
parent 7e541a5f3f
commit 713d29d92a
2 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,7 @@ The TBNAME pseudocolumn in a supertable contains the names of subtables within t
The following SQL statement returns all unique subtable names and locations within the meters supertable: The following SQL statement returns all unique subtable names and locations within the meters supertable:
```mysql ```mysql
SELECT DISTINCT TBNAME, location FROM meters; SELECT TAGS TBNAME, location FROM meters;
``` ```
Use the `INS_TAGS` system table in `INFORMATION_SCHEMA` to query the information for subtables in a supertable. For example, the following statement returns the name and tag values for each subtable in the `meters` supertable. Use the `INS_TAGS` system table in `INFORMATION_SCHEMA` to query the information for subtables in a supertable. For example, the following statement returns the name and tag values for each subtable in the `meters` supertable.

View File

@ -192,7 +192,7 @@ taos> SELECT ts, ts AS primary_key_ts FROM d1001;
获取一个超级表所有的子表名及相关的标签信息: 获取一个超级表所有的子表名及相关的标签信息:
```mysql ```mysql
SELECT DISTINCT TBNAME, location FROM meters; SELECT TAGS TBNAME, location FROM meters;
``` ```
建议用户使用 INFORMATION_SCHEMA 下的 INS_TAGS 系统表来查询超级表的子表标签信息,例如获取超级表 meters 所有的子表名和标签值: 建议用户使用 INFORMATION_SCHEMA 下的 INS_TAGS 系统表来查询超级表的子表标签信息,例如获取超级表 meters 所有的子表名和标签值: