I have a sequence :
CREATE SEQUENCE test_seq START WITH 10000001 INCREMENT BY 1;
and a table :
create table Entry(
id number(5),
name varchar(50) );
I need to increment the value of sequence after inserting a row in the Entry table. So i did this:
CREATE OR REPLACE TRIGGER test_trigger
after INSERT
ON Entry
REFERENCING NEW AS NEW
FOR EACH ROW
BEGIN
SELECT test_seq.nextval INTO :NEW.id FROM dual;
END;
/
but 'after' does not work here but 'before' works. How can i do it for after?