title: Get VIEW ddl using query
body: <p>For database re-architecture I need to get DDL of each table and view in the database(Oracle). I don't want to go to property of each table/view and get SQL out of it in SQL Developer.</p>
  
  <p>I successfully got DDL for table using-</p>
  
  <pre><code>select dbms_metadata.get_ddl('TABLE','Table_name','Schema_Name') 
    from dual;
  </code></pre>
  
  <p>But facing problem with VIEW and MVIEW. Could anyone provide commands/keywords for elements other than table.</p>
  
  <p>Also, I want to export the result in an excel file with first column as <code>TableName</code> and second column as DDL.</p>