title: Inserting value from VARRAY in pl/SQL DROP query
body: <p>I am trying to populate a array through a select query and then dropping values grabbed in select query. </p>
  
  <pre><code>DECLARE 
  TYPE name_list is varray(20) of VARCHAR2(30);
  existingConstraints name_list:=name_list();
  BEGIN
  
  SELECT COUNT(1) INTO v_constraint_exists FROM user_constraints  
  WHERE constraint_name != 'some_value'  AND table_name = 'some_value';
  
  for i in NVL(existingConstraints.FIRST,0)..NVL(existingConstraints.LAST,-1) loop
    #set($name=existingConstraints(i))
    EXECUTE IMMEDIATE 'ALTER TABLE ${some_value} DROP CONSTRAINT ${name} DROP INDEX';
  end loop;
  
  END
  </code></pre>
  
  <p>But i am getting Exception. Can someone suggest me right approach for the same.</p>