How to fix the Oracle error ORA-30741: WITH HIERARCHY OPTION can be specified only for SELECT privilege?

In this post, you’ll learn more about the Oracle ErrorORA-30741: WITH HIERARCHY OPTION can be specified only for SELECT privilege with the details on why you receive this error and the possible solution to fix it.

Oracle Error Description

ORA-30741: WITH HIERARCHY OPTION can be specified only for SELECT privilege

Reason for the Error ORA-30741: WITH HIERARCHY OPTION can be specified only for SELECT privilege

The user tried to specify WITH HIERARCHY OPTION for a privilege other than SELECT privilege.

How to fix the Error ORA-30741: WITH HIERARCHY OPTION can be specified only for SELECT privilege ?

You can fix this error in Oracle by following the below steps

Ensure that the HIERARCHY OPTION is specified only with the SELECT privilege