Sqlite. How to get value of Auto Increment Primary Key after Insert, other than last_insert_rowid()? Sqlite. How to get value of Auto Increment Primary Key after Insert, other than last_insert_rowid()? sqlite sqlite

Sqlite. How to get value of Auto Increment Primary Key after Insert, other than last_insert_rowid()?


The way you're doing it is valid. There won't be a problem if the above snipped is executed concurrently by two scripts. last_insert_rowid() returns the rowid of the latest INSERT statement for the connection that calls it. You can also get the rowid by doing g.db.lastrowid.