SHOW PROPERTY
SHOW PROPERTY displays properties of a user, including the maximum number of connections, password policy, 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, catalog, or PASSWORD_POLICY, 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
| Parameter | Required | Description |
|---|---|---|
| user_name | No | The user name. If not specified, the property of the current user is viewed. |
| property_name | No | The user property name. |
Examples
Example 1: View the properties of the current user.
SHOW PROPERTY;
+----------------------+-----------------+
| Key | Value |
+----------------------+-----------------+
| max_user_connections | 1024 |
| PASSWORD_POLICY | |
| catalog | default_catalog |
| database | |
+----------------------+-----------------+
Example 2: View the properties of the user jack.
SHOW PROPERTY FOR 'jack';
+----------------------+------------------+
| Key | Value |
+----------------------+------------------+
| max_user_connections | 100 |
| PASSWORD_POLICY | pwd_policy_1 |
| catalog | default_catalog |
| database | sales_db |
+----------------------+------------------+
Example 3: Filter properties using LIKE.
SHOW PROPERTY FOR 'jack' LIKE 'PASSWORD_POLICY';
+-----------------+--------------+
| Key | Value |
+-----------------+--------------+
| PASSWORD_POLICY | pwd_policy_1 |
+-----------------+--------------+
See also
ALTER USER: Sets properties for a user.