sqlite中varchar数据类型的最大大小限制是多少?

前端之家收集整理的这篇文章主要介绍了sqlite中varchar数据类型的最大大小限制是多少?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我是新来的sqlite。我想知道在sqlite中varchar数据类型的最大大小限制?

有人可以建议我一些与此相关的信息吗?我在sqlite.org网站上搜索他们give the answer as

Q. What is the maximum size of a VARCHAR in sqlite?

A. sqlite does not enforce the length of a VARCHAR. You can declare a VARCHAR(10) and sqlite will be happy to let you put 500
characters in it. And it will keep all 500 characters intact – it
never truncates.

但是我想知道sqlite中varchar数据类型的最大大小限制。

http://www.sqlite.org/limits.html

Maximum length of a string or BLOB

The maximum number of bytes in a
string or BLOB in sqlite is defined by
the preprocessor macro
sqlITE_MAX_LENGTH. The default value of this macro is 1 billion (1 thousand
million or 1,000,000). You can
raise or lower this value at
compile-time using a command-line
option like this:

-DsqlITE_MAX_LENGTH=123456789 The current implementation will only
support a string or BLOB length up to
231-1 or 2147483647. And some built-in
functions such as hex() might fail
well before that point. In
security-sensitive applications it is
best not to try to increase the
maximum string and blob length. In
fact,you might do well to lower the
maximum string and blob length to
something more in the range of a few
million if that is possible.

During part of sqlite’s INSERT and SELECT processing,the complete content of each row in the database is encoded as a single BLOB. So the sqlITE_MAX_LENGTH parameter also determines the maximum number of bytes in a row.

原文链接:https://www.f2er.com/sqlite/198016.html

猜你在找的Sqlite相关文章