|
jdbcTemplate.execute("DROP TABLE customers IF EXISTS"); |
Caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [DROP TABLE customers if exists ]; 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 'if exists' at line 1
please change Sql spell to "jdbcTemplate.execute("DROP TABLE IF EXISTS customers");"