标题: SQLSyntaxErrorException: You have an error in your SQL syntax [打印本页] 作者: 郭卫东 时间: 2022-8-10 04:04 标题: SQLSyntaxErrorException: You have an error in your SQL syntax
### The error may involve com.example.bootjdbc220620.mapper.CityMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT into city('name','state','country') values(?,?,?)
### Cause: java.sql.SQLSyntaxErrorException: 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 ''name','state','country') values('jack','actived','uk')' at line 1
; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: 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 ''name','state','country') values('jack','actived','uk')' at line 1] with root cause
java.sql.SQLSyntaxErrorException: 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 ''name','state','country') values('jack','actived','uk')' at line 1
at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.29.jar:8.0.29]