I want to make a trigger that sets the joined attribute to the current year. This is what I have working:
CREATE OR REPLACE TRIGGER foo2
BEFORE INSERT ON memberof
FOR EACH ROW
BEGIN :new.joined := 2012;
END;
I want to change 2012 to the code below but keep getting compiler errors. What's the proper syntax to accomplish this?
select extract(year from sysdate) from dual