using tcl and sqlite3 I would like to create a temporary table in memory. Trying this:
package require sqlite3
sqlite3 DB [file normalize X:\memdbtest.db]
DB eval {
ATTACH DATABASE ':memory:' AS memdb;
CREATE TEMP TABLE memdb.values (val TEXT);
}
Gives me an error: near "values": syntax error This I gues has to do with that "values" is a reserved keyword in sqlite. Changing the above code to:
DB eval {
ATTACH DATABASE ':memory:' AS memdb;
CREATE TEMP TABLE memdb.things (val TEXT);
}
gives me the error "temporary table name must be unqualified"
But skipping the memdb. in front of things would put the new table in the regular on disk database.... What is it I am doing wrong here?