把 update table user set name=写成了,update table user setname=,会引起MySQL解析错误,但是报的错误让人莫名其妙,它会报一个编码错误:
com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: 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 '= '???????‘?', mail = 'admin@111.com', postalAddress = '??????111', postCode = '' at line 1
其实是sql语句不对。
SQL语法错误
本文记录了一次因SQL语句书写错误而导致的MySQL解析异常经历。作者误将更新语句中的等号位置放置不当,引起了意料之外的编码错误提示。通过此案例强调了正确书写SQL语句的重要性。
26万+

被折叠的 条评论
为什么被折叠?



