Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/mygod2020/article/details/102728537

Test class has been an error, because the spoken and written sql statement error, but the contrast right before nor bad, looked at Baidu, others are written in Chinese, the main mistake I appear here are brackets around with my id written in the brackets ,,,

Update tb_user
SET
USER_NAME the userName} = {#,
password = # {} password,
name = # {name},
Age Age = # {},
Sex Sex = # {},
Birthday = # {Birthday },
Updated = the NOW ()
WHERE
{ID = # {ID}; the UPDATE tb_user the SET USER_NAME = # {the userName}, password = # {password}, name = # {name}, Age = # {Age}, Sex = # Sex} {, Birthday Birthday} = {#, Updated = the NOW () the WHERE (ID = ID # {});















Guess you like

Origin blog.csdn.net/mygod2020/article/details/102728537