I found a trigger in our Oracle Database
create or replace trigger pii_user_activation_trigger
before insert on pii_user_activation
for each row
begin
select seq_pii_user_activation.nextval
into :new.id
from dual;
end;
I don’t want the trigger to automatically generate the id each time a row is inserted. How can I modify the trigger so that it only generates a new id if the INSERT statement does not provide a value?
It sounds like you just want
This makes the generally reasonable assumption that there is no non-NULL default value specified for the column.