Getting a list of tables in SQLite Database

Just starting out? Need help? Post your questions and find answers here.
Grumble
User
User
Posts: 31
Joined: Sun Jun 15, 2003 8:44 pm

Getting a list of tables in SQLite Database

Post by Grumble »

I started experimenting with SQLite using El Choni's library. It's easy enough to connect to a table of which you know the name, but I can't figure out how to do this for a table that was defined (and given a name) by a user. Anyone knows how can I get a list with the names of the tables inside a given database ?
Pandora
New User
New User
Posts: 3
Joined: Tue Oct 21, 2003 6:27 am

Post by Pandora »

Try to get your information from the sqlite_master table, which should be included in every database.

Code: Select all


SELECT NAME FROM sqlite_master WHERE TYPE='table'

kind regards

Heiko
Post Reply