Вопрос

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.

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top