开发者

String equivalent in mysql datatypes

I want a create a colu开发者_StackOverflow社区mn that needs to store unknown length strings.

I am making a parsing of some file and pushing it's content to the DB and I have no idea about the length , can be pretty big.

So is there any equivalent to String type ?

Thanks


Depends on what your storing...

  • CHAR is a fixed length string
  • VARCHAR is a variable length string
  • TINYTEXT/TEXT/MEDIUMTEXT/LONGTEXT is a text field (long string)

Choose the format that is most appropriate for what your storing. See http://dev.mysql.com/doc/refman/5.0/en/blob.html for more information on the TEXT field and the differences.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜