PRAGMA index_list
This pragma returns one row for each index associated with the given table.
PRAGMA schema.index_list(table-name);
On the sample database
What PRAGMA index_list(tracks) returns on the sample database, in SQLite 3.54.1 as built for the browser by sql.js:
| seq | name | unique | origin | partial |
|---|---|---|---|---|
| 0 | tracks_minutes | 0 | c | 0 |
| 1 | tracks_album | 0 | c | 0 |
What the SQLite documentation says
This pragma returns one row for each index associated with the given table.
Output columns from the index_list pragma are as follows:
- A sequence number assigned to each index for internal tracking purposes.
- The name of the index.
- "1" if the index is UNIQUE and "0" if not.
- "c" if the index was created by a CREATE INDEX statement, "u" if the index was created by a UNIQUE constraint, or "pk" if the index was created by a PRIMARY KEY constraint.
- "1" if the index is a partial index and "0" if not.
From sqlite.org's pragma documentation for SQLite 3.54.1, in the public domain.
← index_info · index_xinfo →