How do you delete rows from a table, where a column contains a substring, but the type of that column is 'Long'. (Yes, I know I shouldn't use Long, but I'm maintaining someone else's mess).
My first attempt was:
delete from longtable
where search_long(rowid) like '%hello%';
(Following on from this answer.)
This returns:
SQL Error: ORA-04091: table blah.longtable is mutating, trigger/function may not see it
I just replicated your problem and got the same error - it seems the function can't work from within a DELETE statement. The full text of the error is:
This procedural approach will work: