Error

[Error/JPA&SQL] SQLException: Data truncated for column 에러 원인과 해결방법

김먼저 2023. 2. 1. 11:10
 다음과 같은 에러 메세지 발생!
 
 
could not execute statement; nested exception is org.hibernate.exception.GenericJDBCException: could not execute statement could not execute statement java.sql.SQLException: Data truncated for column 'XXXX' at row 1"

 

 

 

에러 발생 원인

 

  1. 데이터 크기를 벗어났을 때
  2. 데이터 타입이 다를 때

 

 

 

저는 데이터 타입을 잘못 써서 위 에러가 발생해 수정 후 잘 되고있습니다.