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