How to list the tables in a SQLite database file that was opened with ATTACH?

前端 未结 17 2252
被撕碎了的回忆
被撕碎了的回忆 2020-11-22 11:33

What SQL can be used to list the tables, and the rows within those tables in an SQLite database file - once I have attached it with the

17条回答
  •  情歌与酒
    2020-11-22 12:09

    To show all tables, use

    SELECT name FROM sqlite_master WHERE type = "table"
    

    To show all rows, I guess you can iterate through all tables and just do a SELECT * on each one. But maybe a DUMP is what you're after?

提交回复
热议问题