SQLite Forum

NEXT VALUE FOR in SQLite
Login
<https://sqlite.org/capi3ref.html#sqlite3_last_insert_rowid>

But what are you going to do with it ?  You don't need to know  it for the next INSERT.  Will you be using it for a FOREIGN KEY ?

Also, assuming that your application really is multi-threading and not just multi-processing, are your multiple threads all using the same connection to the database ?  That's not considered safe unless you understand exactly how they interact.  They should be using different connections.