Open Navicat.
Open the database where the data table is located, right-click the database table where you want to add fields, and then click "Design Table".
Now enter the table design interface.
Related recommendations: "Navicat for mysql graphic tutorial"
Click the "Trigger" tab and enter the trigger Name, such as trigger1.
Select the trigger condition, before or after.
#Select which table operation events are triggered, optional insert, update and delete.
In the "Definition" below, enter the sql statement to be executed when triggered, such as insert into oldtable(code) values(newtable.code), and then click "Save". You're done creating the trigger.
The above is the detailed content of How to write triggers in navicat. For more information, please follow other related articles on the PHP Chinese website!