Overview
Displays database permission information.
Columns
Field |
Type |
Nullable |
Description |
|---|---|---|---|
| GRANTEE | varchar(81) | NO | Account Name Granted Permission |
| TABLE_CATALOG | varchar(512) | NO | Fixed value (def) |
| TABLE_SCHEMA | varchar(128) | NO | Database Name |
| PRIVILEGE_TYPE | varchar(64) | NO | Granted Privilege |
| IS_GRANTABLE | varchar(3) | NO | Sublicensable |
Sample query
Query the database permission information and display the first five records.
obclient [oceanbase]> SELECT * FROM information_schema.SCHEMA_PRIVILEGES LIMIT 5;
The query result is as follows:
+------------+---------------+--------------------+----------------+--------------+
| GRANTEE | TABLE_CATALOG | TABLE_SCHEMA | PRIVILEGE_TYPE | IS_GRANTABLE |
+------------+---------------+--------------------+----------------+--------------+
| 'root'@'%' | def | information_schema | ALTER | NO |
| 'root'@'%' | def | information_schema | CREATE | NO |
| 'root'@'%' | def | information_schema | DELETE | NO |
| 'root'@'%' | def | information_schema | DROP | NO |
| 'root'@'%' | def | information_schema | INSERT | NO |
+------------+---------------+--------------------+----------------+--------------+
5 rows in set