UPDATE trigger The UPDATE trigger executes before or after the UPDATE statement is executed. You need to know the following points: 1. In the UPDATE trigger code, you can reference a virtual table named OLD to access the previous value (before the UPDATE statement), and reference a virtual table named NEW to access the newly updated value; 2 .In the BEFORE UPDATE trigger, the value in NEW may also be updated (allowing changes to the value to be used in the UPDATE statement); 3. The values in OLD are all read-only and cannot be updated. The following example ensures that state abbreviations are always uppercase (regardless of whether uppercase or lowercase is given in the UPDATE statement): Input: create trigger updatevendor before update on vends for each row set new.vend_state =&n
1. MySQL UPDATE trigger (update) and trigger in-depth analysis
##Introduction: UPDATE trigger UPDATE trigger executes before or after the UPDATE statement is executed. You need to know the following points: 1. In the UPDATE trigger code, you can reference a virtual table named OLD to access the previous (before UPDATE statement) value, and reference a virtual table named NEW to access the newly updated value; 2 .In a BEFORE UPDATE trigger, the value in NEW may also be updated (allowing changes to the value to be used in the UPDATE statement);
2. SQL Server triggers When a specific field of the table is updated, the Update trigger is triggered
#Introduction: In addition, one more sentence: insert and update data will be saved in the temporary table, so it can be taken out using inserted When deleting these data, you can use deleted to retrieve the deleted data
3. Method of updating this table in Oralce trigger
#Introduction: How to update this table in Oralce trigger. This article talks about two issues: 1. The difference between update trigger before and after. 2. After a certain field in table A is updated, the trigger triggers
4. Oracle manual refresh materialized view problem
Introduction: A recent project requires manual refresh of a materialized view after the document is successfully submitted. The initial plan was to call dbms_refresh.refresh(5. MySQL5.7 supports multiple INSERT/DELETE/UPDATE triggers in a table
Introduction: In version MySQL 5.6, multiple INSERT/DELETE/UPDATE triggers for a table are not supported. For example, create two INSERT triggers in table t1: DELIMITER$$USE`test`$$DROPTRIGGER/*!50032IFEXISTS*/`t.
[Related Q&A recommendations]:
java - What’s wrong with this mysql update trigger?
The above is the detailed content of Detailed introduction to UPDATE trigger. For more information, please follow other related articles on the PHP Chinese website!