MySQL VarChar 255 and above

2019-08-03 08:24发布

问题:

I am currently doing screen scraping and storing in to a MySQL database, I used some of my columns as answer_content varchar(255) NOT NULL,but the problem is some of the data is getting truncated, I was reading following blog post.

But I am not really sure if that is the solution: What is the best solution to save the text without getting them truncated? I am not doing this on a server side and currently doing on a person laptop.

回答1:

Change type to TEXT

Refer here: http://www.electrictoolbox.com/maximum-length-mysql-text-field-types/



回答2:

Change the column type to TEXT.