SHOW Statements

### Syntax[​](#syntax-7 "Direct link to Syntax")

```
SHOW GRANTS [FOR user1 [, user2 ...]] [WITH IMPLICIT] [FINAL]
```

If the user is not specified, the query returns privileges for the current user.

The `WITH IMPLICIT` modifier allows showing the implicit grants (e.g., `GRANT SELECT ON system.one`)

The `FINAL` modifier merges all grants from the user and its granted roles (with inheritance)

## SHOW CREATE USER[​](#show-create-user "Direct link to SHOW CREATE USER")

The `SHOW CREATE USER` statement shows parameters which were used at [user creation](/docs/sql-reference/statements/create/user).

### Syntax[​](#syntax-8 "Direct link to Syntax")

```
SHOW CREATE USER [name1 [, name2 ...] | CURRENT_USER]
```

## SHOW CREATE ROLE[​](#show-create-role "Direct link to SHOW CREATE ROLE")

The `SHOW CREATE ROLE` statement shows parameters which were used at [role creation](/docs/sql-reference/statements/create/role).

### Syntax[​](#syntax-9 "Direct link to Syntax")

```
SHOW CREATE ROLE name1 [, name2 ...]
```

## SHOW CREATE ROW POLICY[​](#show-create-row-policy "Direct link to SHOW CREATE ROW POLICY")

The `SHOW CREATE ROW POLICY` statement shows parameters which were used at [row policy creation](/docs/sql-reference/statements/create/row-policy).

### Syntax[​](#syntax-10 "Direct link to Syntax")

```
SHOW CREATE [ROW] POLICY name ON [database1.]table1 [, [database2.]table2 ...]
```

## SHOW CREATE QUOTA[​](#show-create-quota "Direct link to SHOW CREATE QUOTA")

The `SHOW CREATE QUOTA` statement shows parameters which were used at [quota creation](/docs/sql-reference/statements/create/quota).

### Syntax[​](#syntax-11 "Direct link to Syntax")

```
SHOW CREATE QUOTA [name1 [, name2 ...] | CURRENT]
```

## SHOW CREATE SETTINGS PROFILE[​](#show-create-settings-profile "Direct link to SHOW CREATE SETTINGS PROFILE")

The `SHOW CREATE SETTINGS PROFILE` statement shows parameters which were used at [settings profile creation](/docs/sql-reference/statements/create/settings-profile).

### Syntax[​](#syntax-12 "Direct link to Syntax")

```
SHOW CREATE [SETTINGS] PROFILE name1 [, name2 ...]
```

## SHOW USERS[​](#show-users "Direct link to SHOW USERS")

The `SHOW USERS` statement returns a list of [user account](/docs/operations/access-rights#user-account-management) names.
To view user accounts parameters, see the system table [`system.users`](/docs/operations/system-tables/users).

### Syntax[​](#syntax-13 "Direct link to Syntax")

```
SHOW USERS
```

## SHOW ROLES[​](#show-roles "Direct link to SHOW ROLES")

The `SHOW ROLES` statement returns a list of [roles](/docs/operations/access-rights#role-management).
To view other parameters,
see system tables [`system.roles`](/docs/operations/system-tables/roles) and [`system.role_grants`](/docs/operations/system-tables/role_grants).

### Syntax[​](#syntax-14 "Direct link to Syntax")

```
SHOW [CURRENT|ENABLED] ROLES
```

## SHOW PROFILES[​](#show-profiles "Direct link to SHOW PROFILES")

The `SHOW PROFILES` statement returns a list of [setting profiles](/docs/operations/access-rights#settings-profiles-management).
To view user accounts parameters, see system table [`settings_profiles`](/docs/operations/system-tables/settings_profiles).

### Syntax[​](#syntax-15 "Direct link to Syntax")

```
SHOW [SETTINGS] PROFILES
```

## SHOW POLICIES[​](#show-policies "Direct link to SHOW POLICIES")

The `SHOW POLICIES` statement returns a list of [row policies](/docs/operations/access-rights#row-policy-management) for the specified table.
To view user accounts parameters, see system table [`system.row_policies`](/docs/operations/system-tables/row_policies).

### Syntax[​](#syntax-16 "Direct link to Syntax")

```
SHOW [ROW] POLICIES [ON [db.]table]
```

## SHOW QUOTAS[​](#show-quotas "Direct link to SHOW QUOTAS")

The `SHOW QUOTAS` statement returns a list of [quotas](/docs/operations/access-rights#quotas-management).
To view quotas parameters, see the system table [`system.quotas`](/docs/operations/system-tables/quotas).

### Syntax[​](#syntax-17 "Direct link to Syntax")

```
SHOW QUOTAS
```

## SHOW QUOTA[​](#show-quota "Direct link to SHOW QUOTA")

The `SHOW QUOTA` statement returns a [quota](/docs/operations/quotas) consumption for all users or for current user.
To view other parameters, see system tables [`system.quotas_usage`](/docs/operations/system-tables/quotas_usage) and [`system.quota_usage`](/docs/operations/system-tables/quota_usage).

### Syntax[​](#syntax-18 "Direct link to Syntax")

```
SHOW [CURRENT] QUOTA
```

## SHOW ACCESS[​](#show-access "Direct link to SHOW ACCESS")

The `SHOW ACCESS` statement shows all [users](/docs/operations/access-rights#user-account-management), [roles](/docs/operations/access-rights#role-management), [profiles](/docs/operations/access-rights#settings-profiles-management), etc. and all their [grants](/docs/sql-reference/statements/grant#privileges).

### Syntax[​](#syntax-19 "Direct link to Syntax")

```
SHOW ACCESS
```

## SHOW CLUSTER(S)[​](#show-clusters "Direct link to SHOW CLUSTER(S)")

The `SHOW CLUSTER(S)` statement returns a list of clusters.
All available clusters are listed in the [`system.clusters`](/docs/operations/system-tables/clusters) table.

Note

The `SHOW CLUSTER name` query displays `cluster`, `shard_num`, `replica_num`, `host_name`, `host_address`, and `port` of the `system.clusters` table for the specified cluster name.

### Syntax[​](#syntax-20 "Direct link to Syntax")

```
SHOW CLUSTER '<name>'
SHOW CLUSTERS [[NOT] LIKE|ILIKE '<pattern>'] [LIMIT <N>]
```

### Examples[​](#examples-5 "Direct link to Examples")

```
SHOW CLUSTERS;
```

```
┌─cluster──────────────────────────────────────┐
│ test_cluster_two_shards                      │
│ test_cluster_two_shards_internal_replication │
│ test_cluster_two_shards_localhost            │
│ test_shard_localhost                         │
│ test_shard_localhost_secure                  │
│ test_unavailable_shard                       │
└──────────────────────────────────────────────┘
```

```
SHOW CLUSTERS LIKE 'test%' LIMIT 1;
```

```
┌─cluster─────────────────┐
│ test_cluster_two_shards │
└─────────────────────────┘
```

```
SHOW CLUSTER 'test_shard_localhost' FORMAT Vertical;
```

```
Row 1:
──────
cluster:                 test_shard_localhost
shard_num:               1
replica_num:             1
host_name:               localhost
host_address:            127.0.0.1
port:                    9000
```

## SHOW SETTINGS[​](#show-settings "Direct link to SHOW SETTINGS")

The `SHOW SETTINGS` statement returns a list of system settings and their values.
It selects data from the [`system.settings`](/docs/operations/system-tables/settings) table.

### Syntax[​](#syntax-21 "Direct link to Syntax")

```
SHOW [CHANGED] SETTINGS LIKE|ILIKE <name>
```

### Clauses[​](#clauses "Direct link to Clauses")

`LIKE|ILIKE` allow to specify a matching pattern for the setting name. It can contain globs such as `%` or `_`. `LIKE` clause is case-sensitive, `ILIKE` — case insensitive.

When the `CHANGED` clause is used, the query returns only settings changed from their default values.

### Examples[​](#examples-6 "Direct link to Examples")

Query with the `LIKE` clause:

```
SHOW SETTINGS LIKE 'send_timeout';
```

```
┌─name─────────┬─type────┬─value─┐
│ send_timeout │ Seconds │ 300   │
└──────────────┴─────────┴───────┘
```

Query with the `ILIKE` clause:

```
SHOW SETTINGS ILIKE '%CONNECT_timeout%'
```

```
┌─name────────────────────────────────────┬─type─────────┬─value─┐
│ connect_timeout                         │ Seconds      │ 10    │
│ connect_timeout_with_failover_ms        │ Milliseconds │ 50    │
│ connect_timeout_with_failover_secure_ms │ Milliseconds │ 100   │
└─────────────────────────────────────────┴──────────────┴───────┘
```

Query with the `CHANGED` clause:

```
SHOW CHANGED SETTINGS ILIKE '%MEMORY%'
```

```
┌─name─────────────┬─type───┬─value───────┐
│ max_memory_usage │ UInt64 │ 10000000000 │
└──────────────────┴────────┴─────────────┘
```

## SHOW SETTING[​](#show-setting "Direct link to SHOW SETTING")

The `SHOW SETTING` statement outputs setting value for specified setting name.