Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Temporary Tables
Try this:
Create a generic temporary table with a pid (or similiar unique
identifier) as the first
column.
Insert columns into the table during the user session but do not do a
commit
Query against the table using the unique identifier and thereby multiply
people can
use the table without problem
rollback before exiting the cleanup the temporary table ( or cleanup at
login or during some other point in time to ensure clean temp table)
Jim Ricker <rickerj_at_msn.com> wrote in article
<01bca4e4$ba1aab60$0100a8c0_at_ricker_nt>...
> Often for complex queries it is better to create a temporary table than
to
> use UNION or sub-queries. SqlServer and Sybase have a faciltiy for
creating
> temporary tables which have the following properties:
>
> 1) Temporary tables created are only accessible from the active session.
> Therefore, if the same user id has two active log-ons, only the session
> issuing the CREATE TABLE can access the table. A table created via a
> "normal" CREATE TABLE is accessable from all sessions of the same user
id.
>
> 2) Temporary tables are automatically deleted when a session is
> disconnected.
Received on Sat Aug 09 1997 - 00:00:00 CDT
![]() |
![]() |