79525437

Date: 2025-03-21 12:36:02
Score: 0.5
Natty:
Report link

Since you have an AFTER INSERT trigger that updates the row that was just inserted, the sequence of events is as follows:

  1. The row is inserted

  2. The AFTER INSERT trigger fires and performs an UPDATE.

  3. The AFTER UPDATE trigger fires and logs the update

  4. The AFTER INSERT trigger fires and logs the insert

As a result, you see the update before the insert in the log.

To resolve this issue, you need to set the trigger positions so that the logging trigger fires before the updating trigger.

Reasons:
  • No code block (0.5):
Posted by: user13964273