Q:

ORA-25006 in a FOR UPDATE of CLOB column

I'm attempting to avoid an update with a null value in a CLOB column (for other reasons the column can not have a NOT NULL constraint).
I wrote this trigger:
create or replace TRIGGER "TEST_NULL"
BEFORE UPDATE OR INSERT OF MY_CLOB_COLUMN
ON T
FOR EACH ROW
begin

     if (:old.MY_CLOB_COLUMN is not null and :new.MY_CLOB_COLUMN is null) then

       RAISE_APPLICATION_ERROR(-20001, 'error');

     end if;  

END;

However, I'm getting a 

ORA-25006: cannot specify this column in UPDATE OF clause.

How can I solve this?

A:

You need to remove OF column name and you  need it only as part of UPDATE:
create or replace TRIGGER "TEST_NULL"
BEFORE UPDATE ON T
FOR EACH ROW
begin
     if (:old.MY_CLOB_COLUMN is not null and :new.MY_CLOB_COLUMN is null) then
       RAISE_APPLICATION_ERROR(-20001, 'error');
     end if;  
END;

