Note

This post is a thought. It's a short note that I make about someone else's content online. Learn more about the process thoughts

Here's my thought on ๐Ÿ’ญ sql - How can I list the tables in a SQLite database file that was opened with ATTACH? - Stack Overflow


I learned about the sqlite_master table from this stack overflow answer. This helps make a lot of sense to how sqlite works. The master table contains all the sqlite objects and the sql to create them.

The .tables, and .schema "helper" functions don't look into ATTACHed databases: they just query the SQLITE_MASTER table for the "main" database. Consequently, if you used


sqlite3 database.db "SELECT * from sqlite_master;"

This post was a thought by Waylon Walker see all my thoughts at https://waylonwalker.com/thoughts