SOURCE
create or replace TRIGGER st_cycles
BEFORE INSERT ON cycles
FOR EACH ROW
BEGIN
SELECT s_cycles.nextval
INTO :new.p_id
FROM dual;
END;