sqlite3 :memory: 'CREATE TABLE t(x); INSERT INTO t VALUES (42); SELECT x*2 FROM t;'

Category: Data Science & Analysis

sqlite3 :memory: 'CREATE TABLE t(x); INSERT INTO t VALUES (42); SELECT x*2 FROM t;'

Run an in-memory SQLite experiment with no file

The :memory: database name creates a temporary database that lives only for the command. Multiple SQL statements can be passed in one quoted argument, separated by semicolons. Here a table is created, one row inserted, and a computed value selected. This is ideal for testing SQL syntax without touching disk.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.