Column count doesn't match value count at row 1 - 에러

 

갑자기 잘 돌아가던 쿼리가 에러가 나서 로그를 보니 

 

 

Column count doesn't match value count at row 1 라는 문구가 보임 

 

이상하다.....싶었는데...

org.mybatis.spring.SqlSessionUtils 2020-07-27 11:31:00 [http-nio-8090-exec-4] DEBUG org.mybatis.spring.SqlSessionUtils - Releasing transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7114a3c1]
org.mybatis.spring.SqlSessionUtils 2020-07-27 11:31:00 [http-nio-8090-exec-4] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization deregistering SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7114a3c1]
org.mybatis.spring.SqlSessionUtils 2020-07-27 11:31:00 [http-nio-8090-exec-4] DEBUG org.mybatis.spring.SqlSessionUtils - Transaction synchronization closing SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7114a3c1]
c.c.c.handler.CommExceptionHandler 2020-07-27 11:31:00 [http-nio-8090-exec-4] INFO  c.c.c.handler.CommExceptionHandler - >>> defaultErrorHandler >>> 
org.springframework.jdbc.BadSqlGrammarException: 
### Error updating database.  Cause: java.sql.SQLException: (conn=511718) Column count doesn't match value count at row 1

 

컬럼 하나가 추가가 되서 INSERT 문에서 컬럼이 안맞았던거임

 

INSERT INTO

 

VALUES

 

구문에서 

 

into 에 들어갈 놈들과 values에 들어갈 놈들을 잘 매핑해주자!

'개발공부 > DataBase' 카테고리의 다른 글

mysql에서 대문자/소문자가 포함된 데이터 불러오기  (0) 2020.09.21
오라클 DECODE 알아보기  (0) 2020.05.13
mysql / mariaDB DDL  (0) 2020.04.10
mariaDB / mysql 날짜 계산  (0) 2020.03.31

댓글

Designed by JB FACTORY