프로그래밍/기타
[DB/오류] 1064, "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 ~~"
2jun0
2020. 9. 20. 20:17
Mysql 쿼리를 보내는 프로그램을 테스트 하다보면, 다음과 같은 오류를 발견하곤 한다.
Exception has occurred: ProgrammingError
(1064, "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 '~~~~'
오류의 원인은 sql 쿼리 문법이 틀린 것으로, 따옴표를 붙혀주거나 sql 쿼리를 잘 살펴 보아야 한다.
필자는 아래와 같은 식으로 했다가 아차 싶어서
update A set B = 10 C =10 where D = 1
이렇게 고쳤다.
update A set B = 10, C =10 where D = 1