Name

zeroblob() — Return a BLOB consisting of zeroed-out bytes

Common Usage

zeroblob( size )

Description

The zeroblob() function returns a BLOB value consisting of size bytes. All of the bytes are set to the value zero.

The actual BLOB value is not instanced into memory. This makes it safe to create BLOB values that are larger than the environment can handle. This function is most commonly used to create new BLOB values as part of an INSERT or UPDATE. Once the properly sized BLOB value has been recorded into the database, the incremental BLOB I/O API can be used to access or update subsections of the BLOB value.

See Also

randomblob()

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.