SQLite Forum

Documentation issue (wrong table name) in FAQ, point 7
Login
FAQ Point 7 is:
`(7) How do I list all tables/indices contained in an SQLite database`

The answer given is:

```
From within a C/C++ program (or a script using Tcl/Ruby/Perl/Python bindings) you can get access to table and index names by doing a SELECT on a special table named "SQLITE_SCHEMA". Every SQLite database has an SQLITE_SCHEMA table that defines the schema for the database. The SQLITE_SCHEMA table looks like this:

    CREATE TABLE sqlite_schema (
      type TEXT,
      name TEXT,
      tbl_name TEXT,
      rootpage INTEGER,
      sql TEXT
    );
```
And to query all table names, this is given:

``` sql
SELECT name FROM sqlite_schema
WHERE type='table'
ORDER BY name;

```
But this doesn’t work, as there is no table called `SQLITE_SCHEMA`. Executing the sample query results in '`no such table: sqlite_schema`'.

Did you mean `sqlite_master`? That table does exist and contain the information stated.