Skip to content

RelationalDataAccessApplication has org.springframework.jdbc.BadSqlGrammarException #27

@r00t4dm

Description

@r00t4dm

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");"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions