See the SQLite documentation for the dbstat virtual table, the sqlite_stmt virtual table, and pragma table-valued functions.
Modules
Reading settings as tables
Any pragma that returns a value can be read as a table through its pragma_* table-valued function:
This works for table_info, table_xinfo, table_list, index_list, index_info, index_xinfo, foreign_key_list, foreign_key_check, collation_list, database_list, integrity_check, quick_check, page_count, page_size, freelist_count, journal_mode, synchronous, user_version, schema_version, application_id, encoding, foreign_keys, recursive_triggers, temp_store, cache_size, busy_timeout, max_page_count, function_list, pragma_list, and compile_options.
A few scalar pragmas, including wal_autocheckpoint, mmap_size, and stats, have no table-valued form. Read those with the statement form, such as PRAGMA wal_autocheckpoint.
For which settings can be changed, see Connection settings. Last modified on November 2, 2026