티스토리 뷰

MySQL에 데이터를 넣다보면 다음과 같은 에러가 종종 발생한다.

Error: There was an error while applying the SQL script to the database.
Operation failed: There was an error while applying the SQL script to the database.
ERROR 1406: 1406: Data too long for column ~~ at row 1

이 에러는 내가 넣고자 하는 데이터의 길이가 해당 컬럼에 설정해둔 제한 길이보다 길어서 발생하는 에러이다.

 

따라서, 에러가 발생한 테이블 설정으로 들어가 해당 컬럼의 제한 길이를 늘려준다.

댓글