MySQL Forums
Forum List  »  Quality Assurance

Regarding Error code : 1406 : Data Truncation : Data too long for column
Posted by: Sachin Havinal
Date: April 29, 2013 01:15AM

Hi All,

I am trying to insert values into table and getting error as ERROR 1406: Data Truncation: Data too long for column 'username'. The size of the column is 20 and I am trying to insert username = (length greater than 20). When I execute the command first time then I get this error. And I tried it one more time then I didn;t get any error and values get inserted into the table successfully with no error. But while inserting it takes only first 20 chars of the username field and skipped remaining. So the question is how doesn't it return any error on second time and also why did it take truncate the username and took only fisrt 20 chars?

Options: ReplyQuote


Subject
Views
Written By
Posted
Regarding Error code : 1406 : Data Truncation : Data too long for column
7174
April 29, 2013 01:15AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.