Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Local Temporary Tables / Oracle vesrion of DB2 temporary table in a session

556189Jan 15 2007 — edited Jan 15 2007
hi,

I am working on the migration of an application from DB2 to Oracle. The Db2 application uses statements like these:

declare global temproary table session.tableName ...;

This creates a temporary table in a session. And another user can login into another session and can create a table with the same name, and can drop it, or any other operation. It means these tables are local to a session.

However the correponding replacement in Oracle doesn't allow to create a session specific temporary table:

create global temporary table schema.tableName ...;

Now if another user logs into another session and tries to create a table with same name, it gives an SQL error that the table already exists.

Can anyone suggest, how can I create a temporary table, local to a session in Oracle. The definition of which should only be available to the user connected to this session. I searched on internet and found that Oracle 7 had a concept of local temproary table. Is there a replacement for this in Oracle 10g?

thanks,
Gaurav
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 12 2007
Added on Jan 15 2007
3 comments
1,154 views