:old.clob and :new.clob in triggers

From: Deb <debashish.majumdar_at_gmail.com>
Date: Thu, 17 Jun 2010 01:58:11 -0700 (PDT)
Message-ID: <9b204ea8-328e-4b82-b182-ad74c776e647_at_b35g2000yqi.googlegroups.com>



Hi,

I've a table with a clob column. In a trigger that I need to write, I need to compare the old and new values for this column.

The code inside the trigger body looks like this:

CREATE OR REPLACE TRIGGER tr_clob_test AFTER INSERT OR UPDATE OR DELETE
   ON tbl_clob
   REFERENCING NEW AS NEW OLD AS OLD
   FOR EACH ROW IF UPDATING THEN

	IF :NEW.clob_col <> :OLD.clob_col
	THEN
		INSERT INTO ...
	END IF;

END IF;
.....

END;
/

Is this the right way of comparing the old and new values for a clob, inside the trigger? Please suggest.

--
Thanks
DeB
Received on Thu Jun 17 2010 - 03:58:11 CDT

Original text of this message