title: Create composite index using concat in mysql
body: <p>Using the following command I am being able to get the <code>create index</code> command,</p>
  
  <pre><code>SELECT CONCAT ('
  create index ',index_name,' on ',table_schema,'.',table_name,' (',COLUMN_NAME,');'  
  ) FROM 
  inf_schema.STATS WHERE 
  table_schema='employee' AND 
  table_name='FILESPROC' AND 
  index_name NOT LIKE 'PRIMARY' ;
  </code></pre>
  
  <p>I get the following output:</p>
  
  <pre><code>create index FILENAMEPROCID on employee.FILESPROCESSED (PROCID);
  create index FILENAMEPROCID on employee.FILESPROCESSED (FILENAME);
  create index NENDDATEDataName on employee.FILESPROCESSED (DSN);
  create index NENDDATEDataName on employee.FILESPROCESSED (ENDDATE);
  create index NENDDATEDataName on employee.FILESPROCESSED (DataName);
  create index DSN on employee.FILESPROCESSED (DSN);
  create index ENDDATE on employee.FILESPROCESSED (ENDDATE);
  </code></pre>
  
  <p>However, I need the output in the following manner:</p>
  
  <pre><code>create index FILENAMEPROCID on employee.FILESPROCESSED (PROCID, FILENAME);
  create index NENDDATEDataName on employee.FILESPROCESSED (DSN, ENDDATE, DataName);
  create index DSN on employee.FILESPROCESSED (DSN);
  create index ENDDATE on employee.FILESPROCESSED (ENDDATE);
  </code></pre>
  
  <p>so that I am able to create composite indexes. How am I to achieve this?</p>