create or replace TRIGGER st_actions BEFORE INSERT ON actions FOR EACH ROW BEGIN SELECT s_actions.nextval INTO :new.p_id FROM dual; END;