Click here to Skip to main content
15,896,541 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
does #temp table in sql and Global temporary table in Oracle are same in nature?

if yes please explain me detail if no please explain me what will be alternate for it?

Thanks in advance
Posted

1 solution

RTFM...

Oracle:
These tables do not reside in the system catalogs and are not persistent. Temporary tables exist only during the connection that declared them and cannot be referenced outside of that connection. When the connection closes, the rows of the table are deleted, and the in-memory description of the temporary table is dropped.

SQL:
There are two types of temporary tables: local and global. Local temporary tables are visible only to their creators during the same connection to an instance of SQL Server as when the tables were first created or referenced. Local temporary tables are deleted after the user disconnects from the instance of SQL Server. Global temporary tables are visible to any user and any connection after they are created, and are deleted when all users that are referencing the table disconnect from the instance of SQL Server.
 
Share this answer
 
Comments
tpkpradeep 31-Jul-15 2:40am    
Thanks for reply!!

I'm understanding in this way

In SQL session closes #table gets deleted
but in oracle table will be there but rows get deleted!! Am I getting your point correct!?
Kornfeld Eliyahu Peter 2-Aug-15 6:07am    
No.
Oracle's global temporary table is the same as SQL's local temporary table...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900