SQLite:从 table 中读取没有 rowid 的 blob

SQLite: Reading a blob from a table that has no rowid

我正在使用 C SQLite 库。

我需要从一行中获取 blob 的值。该行位于没有任何行 ID 的 table 中。

这会导致 sqlite3_blob_open 到 return 错误 - table 中不存在 rowid。

像 DB Browser for SQLite 这样的软件可以查询这些 blob 的值,所以一定有办法做到这一点。

答案是结合使用sqlite3_step()和sqlite3_column_blob()