Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Re: Temporary Tables - 2 or 3
SQL>create global temporary table my_log_table
2 (ind number(02)
3 ,log_date date
4 )
5 on commit preserve rows
6 /
Table created.
SQL>DECLARE
2 l_date date;
3 begin
4 EXECUTE IMMEDIATE 'insert into my_log_table values(03,sysdate)' ;
5 commit;
6 SELECT log_date into l_date
7 FROM my_log_table 8 WHERE ind=03 and rownum < 2 9 ; 10 dbms_output.put_line(l_date);
SQL>
You would require this if you need to do large inserts (we did insert
/*+ append */) followed by select for open cursor to return resultset to
the front end appl.
HTH
GovindanK
On Fri, 26 Aug 2005 11:52:23 -0400, "Aggarwal, Meenakshi"
<Meenakshi.Aggarwal_at_fishersci.com> said:
> Does anybody know any reason of not using temporary tables in
> Oracle 9i.
>
> Thanks
> --
> http://www.freelists.org/webpage/oracle-l
-- http://www.freelists.org/webpage/oracle-lReceived on Fri Aug 26 2005 - 13:14:28 CDT
![]() |
![]() |