If I do a ROLLBACK in SQLite and then rerun the ROLLBACKed sequence, will rowid from INSERTs be generated the same?
Asked
Active
Viewed 28 times
0
-
Why does it matter? They're keys to rows in the b-tree that holds a table, that's all. What the numbers are shouldn't matter one bit. – Shawn May 15 '19 at 13:46
-
@Shawn rowid after insert is the closest thing sqlite has to automatic name generation, similar to pointers returned from malloc. – Andreas May 15 '19 at 14:50
-
And just like malloc, you don't care *what* the address/rowid is, just that you have it and can use it when needed. – Shawn May 15 '19 at 15:06
-
@Shawn I think what you are missing is the context/scenario. I purposely omitted it because being *a lot* to explain and inevitably discuss, and the question is in itself pretty much answerable as is. If nobody answers this question within a day or two I'll rewrite it with full background and give you a heads up. – Andreas May 15 '19 at 16:41