Frage

I am adding indices to database tables on creation by executing queries such as

CREATE INDEX "matchcode" on wholesaler_material (matchcode ASC);

I want to make sure that the indices have been added. Is there a way to confirm so? DDMS of Eclipse does not give me any hint as regards indices.

Thank you in advance for you assistance.

War es hilfreich?

Lösung

You can query sqlite_master:

SELECT 1 FROM sqlite_master WHERE type='index' AND name='matchcode';

This will return a result row if there was an index with the given name and nothing otherwise.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top