Oracle Error ORA-46340: Command cannot have both BY and IN SESSION clauses together

Oracle Error Message

ORA-46340: Command cannot have both BY and IN SESSION clauses together

Reason for the Error

BY clause was supplied with IN SESSION clause in the command.

Solution

Use either BY or IN SESSION clause.