title: Create a copy of a table with an additional column using dbms_metadata
body: <p>You can get the DDL of a table by executing <code>DBMS_METADATA.get_DDL('Table','TABLENAME')</code>. I'm looking for a way to change the name of the table in the DDL and then execute the DDL to create an equivalent table with a new name and an additional column.</p>
  
  <pre><code>DECLARE
  stmt clob;
  BEGIN
      SELECT dbms_metadata.get_ddl('TABLE', 'TABLE_NAME') into stmt FROM DUAL;
      /*change the name*/
      EXECUTE IMMEDIATE(stmt);
  END;
  </code></pre>