开发者

How are large text fields stored in mySQL?

开发者 https://www.devze.com 2023-03-11 08:12 出处:网络
For example, this field I am writing in now can holds a lot of text.I\'m assuming this is a mySQL VARCHAR or TEXT field but this is just a guess.According to MySQL: Large VARCHAR vs. TEXT? TEXT should

For example, this field I am writing in now can holds a lot of text. I'm assuming this is a mySQL VARCHAR or TEXT field but this is just a guess. According to MySQL: Large VARCHAR vs. TEXT? TEXT should be used. Where is the line for switching from VARHCAR to TEXT. I'm looking for something more concrete then the link I posted.

I of course want to be able to search开发者_高级运维 the text and edit it.


VARCHAR is limited to 255 characters in all mysql versions <= 5.0.3

There are various sizes of TEXT fields as well, TEXT, MEDIUMTEXT, LONGTEXT.

You can find more details here: http://dev.mysql.com/doc/refman/5.5/en/blob.html

I would strongly suggest defaulting to text or larger for what you're proposing.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号