Concept Flow - BEFORE trigger behavior
DML Statement Executed
BEFORE Trigger Fires
Trigger Function Executes
Modify NEW Row if needed
Return NEW Row
DML Operation Continues with NEW Row
Row Inserted/Updated/Deleted
AFTER Trigger Fires (if any)
When a DML statement runs, the BEFORE trigger fires first, allowing the trigger function to modify the row before the actual insert/update/delete happens.