title: How to create a temporary table in ORACLE with READ ONLY access
body: <p>I am using <code>CREATE GLOBAL TEMPORARY TABLE</code> script to create a temporary table in the oracle DB but its showing <code>SQL Error: ORA-01031: insufficient privileges</code>. I Want to create a temp table with Read only access. Plz help me out in this.</p>
  
  <p>What we are trying to achieve is:</p>
  
  <ol>
  <li>We have to create a table in the destination database which is always GreenPlum.</li>
  <li>In source database(Oracle) we are getting a select query from the USER for example: "select * from ABC A join DEF D on A.Col1=D.col1" then we are creating TEMP TABLE(In case of Oracle) on top of it for example "CREATE GLOBAL TEMPORARY TABLE table101 AS (select * from ABC A join DEF D on A.Col1=D.col1)".</li>
  <li>Then using this TEMP table we get the required information from INFORMATION_SCHEMA for example "select * from ALL_TAB_COLUMNS where table_name='table101' ".By this we will get the column_name,data_type,character_maximum_length etc information. Using this information we can get "create table Statement" using Javascript .</li>
  <li>Then we store this Create table statement in a variable &amp; run it in Execute Row script(Step in pentaho data integration tool) which will create the Table in the destination DB.</li>
  <li>Problem is that we have read only access in oracle. now what to do.</li>
  </ol>
  
  <p>NOTE: In short, we are creating a table in the destination DB using the select statement from the source DB. Means structure of the table in Dest DB depends on the select query in Source DB.</p>