I have a :memory: database. I want to create 5 tables in that database. which is best normal tables/temp tables? Will the tables automatically get delete when we close the connection?
I am planning to use sqlite_sequence table to get the last inserted id of the table. Is there any sqlite_sequence table in :memory: database?
Use
:memory:just like an ordinary database, with normal tables. All data and schema will be lost once you close the connection or quit the process.The
sqlite_sequencetable will be there whenever there are tables with autoincrement columns, however, you could just uselast_insert_rowid()SQL function.