Domanda

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.

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top