Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top