SOURCE
create or replace TRIGGER st_logs
BEFORE INSERT ON logs
FOR EACH ROW
BEGIN
SELECT s_logs.nextval
INTO :new.p_id
FROM dual;
END;