Note
This view is available starting with V2.2.77.
Purpose
This view displays the object privileges of the current user.
Applicability
This view applies only to OceanBase Database in Oracle mode.
Columns
| Column | Type | Nullable? | Description |
|---|---|---|---|
| GRANTEE | VARCHAR2(128) | NO | The username that has the access privilege. |
| OWNER | VARCHAR2(128) | NO | The owner of the object. |
| TABLE_NAME | VARCHAR2(128) | NO | The name of the object. |
| GRANTOR | VARCHAR2(128) | NO | The username that performed the privilege grant. |
| PRIVILEGE | VARCHAR2(40) | NO | The privilege of the object. |
| GRANTABLE | VARCHAR2(3) | NO | Indicates whether the privilege grant option is available. |
| HIERARCHY | VARCHAR2(10) | NO | Indicates whether the hierarchy privilege grant option is available. |
Sample query
A user views the object privileges granted to him.
obclient [TEST3]> SELECT * FROM USER_TAB_PRIVS;
The query result is as follows:
+---------+-------+------------+---------+-----------+-----------+-----------+
| GRANTEE | OWNER | TABLE_NAME | GRANTOR | PRIVILEGE | GRANTABLE | HIERARCHY |
+---------+-------+------------+---------+-----------+-----------+-----------+
| TEST3 | SYS | TBL3 | SYS | UPDATE | NO | NO |
| TEST3 | SYS | TBL3 | SYS | SELECT | NO | NO |
+---------+-------+------------+---------+-----------+-----------+-----------+
2 rows in set