MySQL 注释字段或文本区域的字段类型
正如标题所示,我正在为表中的评论字段寻找一个好的字段类型。它将存储许多字符(因为用户可以不断添加),所以它肯定超过 255 个。我查看了长文本,但不确定......另外,我如何更改字段类型以接受不同的字符,例如撇号。谢谢。
As the title says, I'm after a good field type for a comments field I have in a table. It will store many characters (as users can continuously add to it) so it's definitely over 255. I looked at longtext but wasn't sure...Also how do I change the field type to accept different characters such as apostrophies. Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
LONGTEXT
是您想要的(甚至可能是MEDIUMTEXT
或只是TEXT
,具体取决于您期望的文本的最大长度:TEXT< /code> 最多可以存储 65KB 的文本,这通常绰绰有余。
所有这些字段都可以存储 UTF-8 编码的 Unicode,所以我不确定问题的第二部分(关于撇号)是什么意思。 。
LONGTEXT
is what you want (maybe evenMEDIUMTEXT
or justTEXT
depending on the maximum length of text you're expecting:TEXT
can store up to 65KB of text, which is usually more than enough.All of these fields can store UTF-8 encoded Unicode, so I'm not sure what you mean by the second part of your question (about apostrophies).