I'm trying to write a table trigger (AFTER UPDATE) wherein I want to update the same table in a different schema. Note that both tables does not have any unique or primary key constraint thus I am forced to compare all values in all the column in the where condition.
update OTHERSCHEMA.T1
set c1=:NEW.c1, c2=:NEW.c2...
where c1=:OLD.c1
AND c2=:OLD.c2
Problem is when one column is null it would seem it cannot be compared. I even tried
update OTHERSCHEMA.T1
set c1=:NEW.c1, c2=:NEW.c2...
where NVL(c1,NULL)=NVL(:OLD.c1,NULL)
AND NVL(c2,NULL=NVL(:OLD.c2,NULL)
to no avail. Can someone help me write the correct statement?