Hello all and thank you in advance for your help.

 

I have just realized that a buggy code has been secretly creating indexes.
Thus I have need to make a generic function that can delete all indexes in a
database.

 

I have found that I can use this select to get the names of all existing
indexes:

select name from sqlite_master where type = 'index' and sql is not null;

 

Then I can iterate the result and drop each index.

 

This leaves me with 2 questions.

1.       How stable are the column names and table contexts of the
sqlite_master table?

2.       Is there a better way to accomplish this without resorting to
explicit query of the sqlite_master table?

 

Jeff Archer

Nanotronics Imaging

jsarc...@nanotronicsimaging.com

<330>819-4615

 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to