title: PL/SQL global temp table no return records
body: <p>In the Oracle PL/SQL, I have this code to learn global temp table. I define the temp table as this </p>
  
  <pre><code>CREATE GLOBAL TEMPORARY TABLE "TEST"."WORKTABLE"
           ( "VAL" VARCHAR2(2000 BYTE) ) 
        ON COMMIT PRESERVE ROWS ;
  </code></pre>
  
  <p>When I select it, it didn't show any record. </p>
  
  <p>Please help. </p>
  
  <pre><code>declare
      r_countries countries%rowtype;
      v_country_id countries.country_id%type;
  begin
       ----------- clean temp table ---------
      execute immediate 'truncate table worktable';
  
      select * into r_countries from countries r where r.country_id = 'AU';
  
      select country_id into v_country_id from countries where country_id = 'AU';
  
      insert into worktable
      select country_id from countries where country_id = 'AU';
  
      --dbms_output.put_line(r_countries.country_id);
  
      --dump_table('worktable');
  
       execute immediate 'select * from worktable'; -- no return
  
      ----------- clean temp table ---------
      execute immediate 'truncate table worktable';    
  end;
  /
  </code></pre>