Name

.databases — List all of the currently attached databases

Common Usage

.databases

Description

The .databases command generates a table of all the currently attached databases. The format of the table is:

Column nameColumn typeMeaning
seq IntegerDatabase sequence number
name TextLogical database name
file TextPath and name of database file

The first database (sequence number 0) should always have the name main. This is the database that was first opened. The second database (sequence number 1), if present, should always be the temp database, where any temporary objects are created. Any attached databases will be listed after that.

Get Using SQLite now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.