Name
database_list — List currently attached databases
Common Usage
PRAGMA database_list;
Description
The database_list
pragma lists all of the attached
databases in this database connection. This pragma will return a
three-column table with one row per open or attached
database.
Column name | Column type | Meaning |
---|---|---|
seq
| Integer | Database sequence number |
name
| Text | Logical database name |
file
| Text | Path and name of database file |
Not all attached databases will have an associated file. In-memory databases and temporary databases only have an empty string in the file column.
See Also
ATTACH DATABASE [SQL Cmd, Ap C]
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.