create or replace TRIGGER st_programmes BEFORE INSERT ON programmes FOR EACH ROW BEGIN SELECT s_programmes.nextval INTO :new.p_id FROM dual; END;