-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RelationalDataAccessApplication has org.springframework.jdbc.BadSqlGrammarException #27
Comments
This easy fix is a good issue for a new contributor to fix, so I'm adding the good first issue label. |
hello I tried to submit a PR for this fix but failed |
How did it fail? What messages did you get and from what tools? |
I'm using intelliJ it says this: |
Other than trying again, I have no idea what to tell you. I do my git work from the command line. You could try that. |
"jdbcTemplate.execute("DROP TABLE customers IF EXISTS");" to "jdbcTemplate.execute("DROP TABLE IF EXISTS customers");" as stated in spring-guides#27
I submitted a PR |
gs-relational-data-access/complete/src/main/java/com/example/relationaldataaccess/RelationalDataAccessApplication.java
Line 32 in adcc293
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");"
The text was updated successfully, but these errors were encountered: