Retrieve rowid for a row in an sqlite result set
Utilizing the sqlite c interface I need a way to find the rowid for a row in a result set. 开发者_如何转开发 The select statement that created the result set does not include the rowid column in the result set.
Assume that I have a successful SQLITE_ROW return from sqlite3_step(stmt). How can I retrieve the rowid for the current row?
I have no control over the select statement that returned the results. Please don't suggest SELECT rowid, ....
thanks
Best case would be if the result set you get includes an integer primary key value, in which case that's the same as the rowid. Or if you've got a non-integer primary key you could use that to issue another SELECT query, but if neither of those are possible I think you're out-of-luck I'm afraid.
精彩评论