Drop trigger IF EXISTS T_trigger;
Create Trigger T_trigger
Before insert on AAA for each row
Begin
INSERT into Readandwrite_test.user (time) VALUES (new.timeline);
End
/*
Insert: Activates the trigger when inserting a new row into the table, for example, through the INSERT, LOAD data, and replace statements.
Update: Activates a trigger when a row is changed, for example, through an UPDATE statement.
Delete: Activates the trigger when a row is deleted from the table, for example, through the Delete and replace statements.
*/
--problems that may be encountered
--If you are insert/update in the trigger with the data you just inserted, it will cause a loop call. For example:
--Create TRIGGER test before update on test for each row update test set new.updatetime = Now () where id=new.id; END
--Should use set:
Create trigger test before update on test for each row set new.updatetime = Now (); END
MySQL (trigger Trigger)