sql语句错误debug:org.springframework.jdbc.BadSqlGrammarException: ### Error updating database. Cause: co

org.springframework.jdbc.BadSqlGrammarException: ### Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.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 ‘-company where id=‘a43875a6-9376-47f3-955d-9a48c74a7b10’’ at line 1 ### The error may involve com.itheima.dao.company.CompanyDao.deleteById-Inline ### The error occurred while setting parameters ### SQL: DELETE FROM ss-company where id=? ### Cause: com.mysql.jdbc.exceptions.jdbc4.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 ‘-company where id=‘a43875a6-9376-47f3-955d-9a48c74a7b10’’ at line 1 ; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.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 ‘-company where id=‘a43875a6-9376-47f3-955d-9a48c74a7b10’’ at line 1 at
关于sql语法出错,关注两点
一:MySQLSyntaxErrorException:sql 出现此信息代表sql语法出错
二: near ‘-company where id=’ 这里表示错误的地方 本人应该用下划线

你可能感兴趣的:(sql语句错误debug:org.springframework.jdbc.BadSqlGrammarException: ### Error updating database. Cause: co)