Students to write a trigger, a little help him to study the next
The following is primarily a personal guess to understand
Main Talk Update
When we create the trigger, the database listens for events on the table that created the trigger.
When an update operation occurs for a record in the table:
-The database uses old to store older records before the update is performed.
-Perform update.
-After the update succeeds, use new to store (or point to) the record.
As a result, we can access the old record by using the OID field name to access the new record by using new . Field name . Both old and new refer to records in the Update table.
See online someone said update, will generate two tables, one is deleted one is inserted, should be right.
The actual application of trigger seems to be very few? It seems like the general application is to achieve trigger operation, feel more simple and flexible.
More specific principles, and so on when the time to study again. Let's record a little bit.
MYSQL Trigger Personal records