Note
This view is available starting with V1.4.
Purpose
Records the privilege information of a user.
Columns
| Column | Type | Nullable | Description |
|---|---|---|---|
| GRANTEE | varchar(81) | NO | The account name to which privileges are granted. |
| TABLE_CATALOG | varchar(512) | NO | The table catalog, which is fixed to def. |
| PRIVILEGE_TYPE | varchar(64) | NO | The privilege granted. |
| IS_GRANTABLE | varchar(3) | NO | Indicates whether the privilege can be granted to other users. |
Sample query
Query the privilege information of a user.
obclient [infotest]> SELECT * FROM information_schema.USER_PRIVILEGES;
The query is as follows:
+-------------+---------------+----------------+--------------+
| GRANTEE | TABLE_CATALOG | PRIVILEGE_TYPE | IS_GRANTABLE |
+-------------+---------------+----------------+--------------+
| 'test1'@'%' | def | USAGE | NO |
+-------------+---------------+----------------+--------------+
1 row in set