Sqlite: temporary table / view in db read-only?

It seems that sqlite won't let me create a temporary read-only view in db. Am I missing something? If it is TIME, I realized that the connection mode to DB should not matter.

I even indicated "PRAGMA temp_store = MEMORY" - this did not help.

Is there a reasonable alternative to using views?

+4
source share
1 answer

You can create a temporary view that references the data in the main db.

CREATE VIEW temp.userview AS select userid, firstname, lastname from main.usertbl; 

Then go into a view like this ...

 SELECT * from temp.userview; 
+1
source

All Articles