Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ebnf show privileges #17027

Merged
merged 3 commits into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
25 changes: 21 additions & 4 deletions sql-statements/sql-statement-show-privileges.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ This statement shows a list of assignable privileges in TiDB. It is a static lis

## Synopsis

**ShowStmt:**

![ShowStmt](/media/sqlgram/ShowStmt.png)
```ebnf+diagram
ShowPrivilegesStmt ::=
"SHOW" "PRIVILEGES"
```

## Examples

```sql
mysql> show privileges;
SHOW PRIVILEGES;
```

```
+---------------------------------+---------------------------------------+-------------------------------------------------------+
| Privilege | Context | Comment |
+---------------------------------+---------------------------------------+-------------------------------------------------------+
Expand Down Expand Up @@ -80,5 +84,18 @@ The `SHOW PRIVILEGES` statement in TiDB is fully compatible with MySQL. If you f

## See also

<CustomContent platform="tidb">

* [SHOW GRANTS](/sql-statements/sql-statement-show-grants.md)
* [Privilege Management](/privilege-management.md)
* [`GRANT <privileges>`](/sql-statements/sql-statement-grant-privileges.md)
dveeden marked this conversation as resolved.
Show resolved Hide resolved

</CustomContent>

<CustomContent platform="tidb-cloud">

* [SHOW GRANTS](/sql-statements/sql-statement-show-grants.md)
* [Privilege Management](https://docs.pingcap.com/tidb/stable/privilege-management)
* [`GRANT <privileges>`](/sql-statements/sql-statement-grant-privileges.md)

</CustomContent>