I have this database file under the usual databases folder and a bunch of tables inside it.
Please note that I don't want to retrieve under the command line. I know I can use the ".tables" command.
I want to retrieve a list of all tables in it, using code, so that I can execute some specific algorithms on each of them.
Also, I didn't find any questions with this problem on Android, so please forgive me if there is any. I was wondering if there is any function I can use under DatabaseUtils
, but I didn't find any either.
The SHOW TABLES command is used to display the table names in a database as well as the server.
Use
select name 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