Skip to content

Create a new SQLite database

New File… creates a local database file at the location you choose. Use In-Memory for a temporary database that lasts only for the connection.

Choose a writable folder and a new file name, such as docs_bookstore.sqlite. SQLite can also need space and write access for journal or WAL files beside the database.

This guide creates a file on your Mac. For a remote database, create the file on its host first, then open it over SSH.

  1. Choose File › New Connection….
  2. Select SQLite in Driver.
  3. Enter a Name for the connection.
  4. Leave Connect via SSH off.
  5. Click New File….
  6. Choose the folder and enter the new file name.
  7. Click Create.
  8. Click Test.
  9. Click Save & Connect when the test succeeds.
SQLite connection form with New File and In-Memory controls

An empty database has no application tables. Run this SQL in the query editor:

CREATE TABLE books (
id INTEGER PRIMARY KEY,
title TEXT NOT NULL
);

You can also create tables with the structure editor. Use SQLite data types when choosing column declarations.

In a local SQLite connection form, click In-Memory, then Save & Connect. The Database Path becomes :memory:. Disconnecting discards that database, including its tables and rows.

A connection test opens a separate temporary database. Use the connected database for your SQL work, and a file when you need to keep the data.

Unable to open the SQLite database file. Verify that the file allows read and write access.
SQLite needs access to the database folder for journal or WAL files.

Follow file access and permissions if TableAI requests access to the containing folder. For other failures, see connection troubleshooting.