MySQL Data Truncation Error

前端 未结 5 2050
面向向阳花
面向向阳花 2020-12-06 06:26

I\'m working with a fairly simple database, from a Java application. We\'re trying to insert about 200k of text at a time, using the standard JDBC mysql adapter. We interm

5条回答
  •  一向
    一向 (楼主)
    2020-12-06 06:44

    It sounds to me like you are trying to put too many bytes into a column. I ran across a very similar error with MySQL last night due to a bug in my code. I meant to do

    foo.status = 'inactive'
    

    but had actually typed

    foo.state = 'inactive'
    

    Where foo.state is supposed to be a two character code for a US State ( varchar(2) ). I got the same error as you. You might go look for a similar situation in your code.

提交回复
热议问题