Home » SQL & PL/SQL » SQL & PL/SQL » Temporary Table
Temporary Table [message #20725] Sat, 15 June 2002 13:50 Go to next message
Obede F. Souto
Messages: 5
Registered: June 2002
Junior Member
How can I use a temporary table in an Oracle Stored Procedure?
Please, send me an example.
Re: Temporary Table [message #20729 is a reply to message #20725] Sun, 16 June 2002 07:53 Go to previous message
Mahesh Rajendran
Messages: 10690
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
if you are looking for global temp tables,
this may help you.
SQL> CREATE OR REPLACE Procedure tempTable
2 as
3 str varchar2(1000);
4 ttable varchar2(80);
5 BEGIN
6 tTable := 'TempTab';
7 str := 'CREATE GLOBAL TEMPORARY TABLE ' || tTable ||
8 '(Field1 DATE ) ON COMMIT DELETE ROWS';
9 EXECUTE IMMEDIATE str;
10 END;
11 /

Procedure created.

SQL>
Previous Topic: how to dynamically declare a cursor based on the parameter passed to the proc!!!!!
Next Topic: oracle+vb+oo4o ------------------plz help me to initiaate--------------
Goto Forum:
  


Current Time: Mon Oct 22 00:17:17 CDT 2018