How to get list of all tables in sqlite programmatically

How to programmatically list all available tables in sqlite?

+7
source share
3 answers

try the following:

SELECT * FROM sqlite_master where type='table'
+19
source

Use the sql statement below to list the entire table in sqlite database

SELECT * FROM dbname.sqlite_master WHERE type='table';

The same question was asked earlier in StackOverFlow.

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

+6
source

worked for me

    SELECT * FROM sqlite_master where type='table'
+2
source

All Articles