Home > database >  Mysql5.7 upgrade to mysql8.0.17 trigger problems
Mysql5.7 upgrade to mysql8.0.17 trigger problems

Time:09-17

Trigger statement below

CREATE the TRIGGER ` account_add ` AFTER INSERT ON ` account ` FOR EACH ROW
The BEGIN
The UPDATE company_info_statistics cis
The SET of cis. ACCOUNT_NUM=cis. ACCOUNT_NUM + 1
WHERE
Cis.COM PANY_INFO_ID=new.COM PANY_ID;
END;


In mysql8 execution, prompt syntax errors, looking for a long time, but could not find where there are problems, below is the error message

CREATE the TRIGGER ` account_add ` AFTER INSERT ON ` account ` FOR EACH ROW
The BEGIN
The UPDATE company_info_statistics cis
The SET of cis. ACCOUNT_NUM=cis. ACCOUNT_NUM + 1
WHERE
Cis.COM PANY_INFO_ID=new.COM PANY_ID
1064 - You have an error in your SQL syntax; Check the manual that corresponds to your MySQL server version for the right syntax to use near 'at line 6
Time: 0.017 s

CodePudding user response:

The last point number
  • Related