How can I do the following task in Oracle
You should probably consider creating the Global Temp table once ... outside of this entire process ... 
creating it "on the fly" like this doesn't really make any sense.  

Note also that the data is by default transaction based ... so those records you're inserting will tend to "dissappear" quite quickly (ie once you hit a commit).

  SQL&gt; CREATE GLOBAL TEMPORARY TABLE temp(CID NUMBER);

  Table created.

  SQL&gt; insert into temp ( select level from dual connect by level &lt;= 10);

  10 rows created.

  SQL&gt; Select * from temp;

         CID
  ----------
           1
           2
           3
           4
           5
           6
           7
           8
           9
          10

  10 rows selected.

  SQL&gt; commit;

  Commit complete.

  SQL&gt; Select * from temp;

  no rows selected

  SQL&gt;


You don't need the PL/SQL block for this, and in fact creates more overhead than it's worth.