Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 mysql 数据库,我想无限制地使用 varchar 字段。即我想对任意数量的字符使用 varchar 字段,我该怎么做?
使用text类型。它实际上是无限的。例如
text
create table mytable ( mycol text );
如果您可以将数据容纳在 255 个字符内,则该varchar字段并不意味着无限长度,否则您可以使用该text字段。
varchar
从这个问题中了解更多信息
使用文本而不是 Varchar。在这里检查