study/Project 🐾

[Spring] Column count doesn't match value count at row 1

서나쓰 2021. 2. 11. 00:22
728x90
### The error occurred while setting parameters
### SQL: INSERT INTO Mom_info (want_act,   want_age, kids_num, kids_age,   payment, payment_ok,
si, gu, dong, schedule,   schedule_ok, description, sitter_gender,   interview_type, care_type
,   openingdate, memberno) VALUES (?, ?,   ?,   ?, ?, ? ?, ?, ?, ?,   ?, ?, ?,?,?,?, ?);
### Cause: java.sql.SQLException: Column count doesn't match value count at row 1
; bad SQL grammar []; 
nested exception is java.sql.SQLException: Column count doesn't match value count at row 1

프로젝트 중 컬럼 추가로 인해서 mapper에 컬럼 추가 한 후에 나타난 에러

Column count doesn't match value count at row 1 이 에러는 sql문에 value에서 컴마(, )가 빠졌을 때 나는 에러이다

sql문 쓸 때 주의할것!!

728x90