title: oracle drop index if exists
body: <p>How do you drop an index only if it exists?</p>
  
  <p>It seems simple but I did found anything on the net.
  The idea is to drop it only if it exists, because if not, I will have an error and my process stops.</p>
  
  <p>I found this to find if the index exists:</p>
  
  <pre><code>select index_name
  from user_indexes
  where table_name = 'myTable'
  and index_name='myIndexName'
  </code></pre>
  
  <p>But I don't know how to put it together with </p>
  
  <pre><code>DROP INDEX myIndexName
  </code></pre>