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
What is built-in/administrator?
Why do you need a sql server?
How to populate a table in sql server?
Write a sql query to display the current date?
How to convert a table data in XML format in sql server?
Is null vs coalesce?
Do you know what guidelines should be followed to help minimize deadlocks?
Do you know sql server 2008 introduces automatic auditing?
What is dynamic cursor in SQL SERVER?
How does recursive cte works in sql server?
What happens if we shrink log file in sql server?
Due to some maintenance being done, the sql server on a failover cluster needs to be brought down. How do you bring the sql server down?
Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?
What is difference between clustered index and non clustered index?
What is Dependency Injection and provide example?