Skip to main content
Version: Candidate-4.1

SHOW PROPERTY

SHOW PROPERTY displays properties of a user, including the maximum number of connections, the default catalog, and the default database.

tip

The current user can view their own properties. Only users with the user_admin role can view the properties of other users.

info

To set properties such as database or catalog, use the ALTER USER command with SET PROPERTIES. For max_user_connections, you can use the SET PROPERTY syntax.

Syntax​

SHOW PROPERTY [FOR 'user_name'] [LIKE '<property_name>']

Parameters​

ParameterRequiredDescription
user_nameNoThe user name. If not specified, the property of the current user is viewed.
property_nameNoThe user property name.

Examples​

Example 1: View the properties of the current user.

SHOW PROPERTY;
+----------------------+-----------------+
| Key | Value |
+----------------------+-----------------+
| max_user_connections | 1024 |
| catalog | default_catalog |
| database | |
+----------------------+-----------------+

Example 2: View the properties of the user jack.

SHOW PROPERTY FOR 'jack';
+----------------------+------------------+
| Key | Value |
+----------------------+------------------+
| max_user_connections | 100 |
| catalog | default_catalog |
| database | sales_db |
+----------------------+------------------+

Example 3: Filter properties using LIKE.

SHOW PROPERTY FOR 'jack' LIKE 'max_user_connections';
+----------------------+-------+
| Key | Value |
+----------------------+-------+
| max_user_connections | 100 |
+----------------------+-------+

See also​

ALTER USER: Sets properties for a user.

Rocky the happy otterStarRocks Assistant

AI generated answers are based on docs and other sources. Please test answers in non-production environments.