There are 3 ways of creating in-memory databases in SQLite:
:memory: filename to create distinct in-memory database. Every
:memory: database is distinct from every other. For example:
The same in-memory database can be shared/opened by two or more connections as follows:
Create two or more distinct but still shareable in-memory databases by using named in-memory database:
When an in-memory database is named in this way, it will only share its cache with another connection that uses exactly the same name.