Shaun
Shaun

Reputation: 2181

How to check if index includes a particular column in SQLite

I want my app to add a column to an existing index if that column hasn't already been added to the index.

Is there a way to test if the column exists in the index, or am I better off dropping and rebuilding the entire index including the new column?

Cheers guys.

Upvotes: 1

Views: 90

Answers (1)

CL.
CL.

Reputation: 180070

To get information about the columns in an index, use PRAGMA index_info.

Upvotes: 1

Related Questions