How can I get the list of all the available tables in sqlite programmatically?
To list all tables in an SQLite3 database, you should query the sqlite_master table and then use the fetchall() to fetch the results from the SELECT statement. The sqlite_master is the master table in SQLite3, which stores all tables.
int count = cursor. getCount();
Open a command prompt (cmd.exe) and 'cd' to the folder location of the SQL_SAFI. sqlite database file. run the command 'sqlite3' This should open the SQLite shell and present a screen similar to that below.
Maximum Number Of Tables In A Join SQLite does not support joins containing more than 64 tables. This limit arises from the fact that the SQLite code generator uses bitmaps with one bit per join-table in the query optimizer.
try this :
SELECT * FROM sqlite_master where type='table';
Use the below sql statement to get list of all table in sqllite data base
SELECT * FROM dbname.sqlite_master WHERE type='table';
The same question asked before on StackOverFlow.
How to list the tables in an SQLite database file that was opened with ATTACH?
worked for me
SELECT * FROM sqlite_master where type='table'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With