Home > database >  MySQL trigger the corresponding data table and in the body of the trigger to operate on the data tab
MySQL trigger the corresponding data table and in the body of the trigger to operate on the data tab

Time:11-18

Create the trigger aaa after insert for each row

The begin

The update aaa set date=date (now ()) where new. Id=aaa. Id;

end;

Is the situation more than you can write code?

CodePudding user response:

Can't be the same table

CodePudding user response:

Use less as far as possible triggers, don't do not use as a last resort, the nima wrong track not to come out, and easy to lock table
  • Related