Search notes:

ORA-01786: FOR UPDATE of this query expression is not allowed

The error message ORA-01786: FOR UPDATE of this query expression is not allowed is thrown, for example, when mistakenly formulating a partition extension clause with for partition (…) instead of the correct partition for (…).

Example using aggregate function

create table tq84_ora_01786 (
    grp   varchar2(3) not null,
    val   number(7,2) not null
);

select
   sum(val)
from
   tq84_ora_01786
for update;

drop table tq84_ora_01786;

See also

Other Oracle error messages such as ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc

Index