title: Delete all indexes of specific database
body: <p>How to delete all indexes from one database, whether clustered or nonclustered?</p>
  
  <p>I need do that with script, not over GUI.</p>
  
  <p><strong>EDITED</strong></p>
  
  <p>Database has 7 tables, some of them are lookups, some are related over foreign keys. Every table has minimal one index, created in time the primary key was created, so automatically was created constraint. When deleting such indexes over an GUI, I got an error that indexes cannot be deleted because of dependency on other keys. </p>
  
  <p>So, I need to first delete an indexes keys that are foreign keys, and then an indexes created over primary keys.</p>