Re: Stor. proc. & temp tables dynamical

From: Norm Wright <NWRIGHT_at_DEVSIS.MIT.EDU>
Date: 1996/03/07
Message-ID: <4hni6u$bi2_at_senator-bedfellow.MIT.EDU>#1/1


In article <4hlagm$dcb$2_at_mhadg.production.compuserve.com>, 76756.3641_at_CompuServe.COM says...
>
>can you create temp tables dynamically in ORACLE 7.x Stored
>Procedures. Or do you have to have them created before entering
>the SP.
>
>robin cyrus
>First Interstate Bank
>Arizona
>
>--
> F. I. B. of Arizona
Yes you can create tables if you use the package DBMS_SQL (This is dynamic sql for PL/SQL and can be used in Stored procedures. Later you can manipulate these tables (again using DBMS_SQL).

The tables you create are NOT TEMPORARY in two respects:

	(1) They persist until you explictly drop them.
	(2) They are not automatically assigned a unique name, so you will
		have to be careful when naming them.

Other things to note: tables created under DBMS_SQL are owned by the user that created the stored procedure -- not the user that called the stored procedure.

Good luck Received on Thu Mar 07 1996 - 00:00:00 CET

Original text of this message