Hi Folks, i I'm unsure if SQLite provides the functionality I seek. On a duplicate entry/conflict I would like to retrieve the rowid of the conflicting entry; by possibly updating columns, or replacing the row entirely while ensuring the rowid doesn't change.
On an INSERT OR REPLACE it deletes the existing row and inserts the specified data with the next monotonic number as the rowid. Unfortunately for me this behaviour is undesirable. I'm looking for a way to do one of the following: * Replace the conflicting row while preserving it's rowid then get the last_insert_rowid(). * Update or 'touch' the conflicting row to retrieve the rowid number, in hopes that the last_insert_rowid() will be updated.. * Retrieve just the rowid number due to a duplicate conflict. I understand the latter can be done in the logic of the program by handling the duplicate value error, however I was hoping there would be a way to deal with this directly with SQLite. Any advice would be much appreciated. Thanks, Naveen Nathan