I'm trying to write a simple trigger that will update a date field (named 'year') for an existing row. I get a bit confused as to syntax. Can someone validate as to whether I have this syntax correct? I just want to put the current year (i.e. 2010) into the date field 'year'.
create or replace trigger "SCHEMATEST".SET_YEAR
after insert on schematest.editorial for each row
update editorial set year=TO_DATE(SYSDATE,'YYYY');