What is the difference between a Local temporary table and a
Global temporary table? How is each one used?
Answer Posted / tarun kumnar basak
A Local Temporary table is almost the same as the Temporary
table in oracle. The main difference is that in oracle
you've to specify the keyword local in your query and also
Local Temporary table exists only for the user who is
created the table. So no other session can use/see the
temporary table.
Where as GTT is another kind of temporary table in oracle
which is by default the temporary table(if you don't
specify the keyword local). GTT can be used by every
user/schema which is connected to the DB irrespective of
each others session and without knowing what data resides
for a particular user. As soon as you log off from the
server the GTT also deleted. It is more kind of session
specific where the structure of the table is shared among
all users but not the data. Data remains private for each
users session and no Lock can be aquired on the table.
| Is This Answer Correct ? | 5 Yes | 3 No |
Post New Answer View All Answers
Explain microsoft sql server functions?
Explain in details security in SQL azure?
What are the restrictions while creating batches in sql server?
Can we hide the definition of a stored procedure from a use?
How many levels of sp nesting is possible?
How does stuff differ from the replace function?
Can two tables share a primary key?
What are policy management terms?
Explain triggers in sql?
What is model database? : SQL Server Architecture
What is clustered vs nonclustered index?
Differentiate between ms sql server reporting services vs crystal reports?
What is a partition key?
How sql server executes a statement with nested subqueries?
explain extended properties