I need to write a trigger that will create a record in another table.
In my user table when a registering user responds to an activation email their status in that table changes from 0 to 1. When this change occurs I need it create a record in another table that has an auto-incrementing int primary id (Party).
Since the user status can be of three different states (not active (0), active (1), and banned (-1) I need this trigger to only set off when the status is changed from 0 to 1.
Can someone please help me with the SQL here?

1 Answer