What is the maximum size limit of varchar data type in sqlite?

前端 未结 1 1360
别跟我提以往
别跟我提以往 2021-02-01 13:14

I\'m new to sqlite. I want to know the maximum size limit of varchar data type in sqlite?

can anybody suggest me some information related to this? I searched on sqlite.or

相关标签:
1条回答
  • 2021-02-01 14:17

    from 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,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.

    0 讨论(0)
提交回复
热议问题