SQLite CLOB Tools - Import, Export, View and Edit

SQLite doesn’t have a dedicated CLOB data type. However, it can handle large text data using the TEXT type. In SQLite, the TEXT data type is a fundamental and widely – used option for storing character – based data. More: SQLite TEXT (CLOB).

SQLite CLOB - type family and size limits

Type in SQLiteMaximum size
TEXTstorage class, subject to the same SQLITE_MAX_LENGTH
VARCHAR(n) / CLOBonly "type affinity" spellings - SQLite does not enforce a length

CLOB versus BLOB in SQLite

SQLite is dynamically typed: declaring a column BLOB or TEXT only sets its type affinity, and what is actually stored is decided by the value written. Declaring a column CLOB does not give you CLOB semantics.

What limits you first

SQLITE_MAX_LENGTH, a compile-time constant defaulting to one billion bytes. That figure is more accurate than "1 GB", and the only way to change it is to rebuild SQLite - there is no runtime setting.

CLOB from the command line

Things that bite with CLOB in SQLite