title: Execute statement in right order
body: <p>When executing this statement as script (f5)</p>
  
  <pre><code>DECLARE
    COUNT_INDEXES INTEGER;
  BEGIN
    SELECT COUNT(*)
    INTO COUNT_INDEXES
    FROM USER_INDEXES
    WHERE INDEX_NAME = 'NAME1' ;
  
    IF COUNT_INDEXES &gt; 0 THEN
      EXECUTE IMMEDIATE 'DROP INDEX NAME1';
    END IF;
  END;
  
  DECLARE
    COUNT_INDEXES INTEGER;
  BEGIN
    SELECT COUNT(*)
    INTO COUNT_INDEXES
    FROM USER_INDEXES
    WHERE INDEX_NAME = 'NAME2' ;
  
    IF COUNT_INDEXES &gt; 0 THEN
      EXECUTE IMMEDIATE 'DROP INDEX NAME2';
    END IF;
  END;
  </code></pre>
  
  <p>I get an error message.
  But when I select the first one, execute it, then the second one and execute, it works flawlessly.</p>
  
  <p>Is there a way to make this work when pressing f5?</p>