create or replace TRIGGER st_menus BEFORE INSERT ON menus FOR EACH ROW BEGIN SELECT s_menus.nextval INTO :new.p_id FROM dual; END;