title: How to create index through a dynamic sql?
body: <p>I need a create index through a dynamic sql with input parameters index name, table name, and column name.</p>
  
  <p>I was able to compile the below procedure that contains the dynamic sql but when I tried to execute it, it gave me "invalid CREATE command"</p>
  
  <pre><code>    create or replace procedure cr_ind
  (p_index in varchar2, 
  p_table in varchar2, 
  p_column in varchar2)
  
  as
    stmt_txt varchar2(200);
  Begin  
    stmt_txt:= 'create index'
               ||p_index
               ||'on'
               ||p_table
               ||'('
               ||p_column
               ||','
               ||p_column2
               ||',' 
               ||p_column3
               ||')';
  execute immediate stmt_txt;
      end;
      /
  execute cr_ind('name_inx','clone_dummy2','dummy_name');
  </code></pre>
  
  <p>How do I make it work or is it even possible to create indexes dynamically?</p>
  
  <p>Thanks</p>