Oracle Error QSM-02123: subquery and UNION mv’s must be primary key mv’s

Oracle Error Message

QSM-02123: subquery and UNION mv’s must be primary key mv’s

Reason for the Error

The capability in question is not supported when the materialized view is not a primary key materialized view and uses subqueries or the union operator in this context.

Solution

Re-create the materialized view as a primary key materialized view.