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

SHOW VARIABLES



Displays all session variables and their details, such as names, values, and types.

See also: SHOW_VARIABLES

Syntax

SHOW VARIABLES [ LIKE '<pattern>' | WHERE <expr> ]

Examples

The following example lists all session variables with their values and types:

SHOW VARIABLES; ┌──────────────────────────┐ │ name │ value │ type │ ├────────┼────────┼────────┤ │ a │ 3 │ UInt8 │ │ b │ 55 │ UInt8 │ │ x │ 'xx' │ String │ │ y │ 'yy' │ String │ └──────────────────────────┘

To filter and return only the variable named a, use one of the following queries:

SHOW VARIABLES LIKE 'a'; SHOW VARIABLES WHERE name = 'a';

Was this page helpful?