create or replace TRIGGER st_xml_types BEFORE INSERT ON xml_types FOR EACH ROW BEGIN SELECT s_xml_types.nextval INTO :new.p_id FROM dual; END;