oracle:sql:trigger:create_or_replace_trigger
Oracle - SQL - Trigger - Create or Replace Trigger
CREATE OR REPLACE TRIGGER trigger-name BEFORE INSERT ON table-name FOR EACH ROW WHEN (NEW.field-name IS NULL OR NEW.field-name = '<new>') BEGIN SELECT 'PR-' || sequence-name.NEXTVAL INTO :NEW.field-name FROM DUAL; END;
oracle/sql/trigger/create_or_replace_trigger.txt · Last modified: 2021/08/11 11:32 by peter