📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

SHOW TAGS



Lists tag definitions in the current tenant. You can also query tag definitions through the system.tags table.

See also: CREATE TAG, DROP TAG.

Syntax

SHOW TAGS [ LIKE '<pattern>' | WHERE <expr> ] [ LIMIT <n> ]

Output Columns

ColumnDescription
nameTag name
allowed_valuesPermitted values list, or NULL if any value is allowed
commentTag description
created_onCreation timestamp

Examples

Show all tags:

SHOW TAGS;

Filter tags by name pattern:

SHOW TAGS LIKE 'env%';

Filter with a WHERE condition:

SHOW TAGS WHERE comment IS NOT NULL;

Limit results:

SHOW TAGS LIMIT 5;

Equivalent query using the system table:

SELECT * FROM system.tags;

Was this page helpful?