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


Please Help Members By Posting Answers For Below Questions

What is the difference between value type and reference type?

707


How to define the name and server for a new dsn?

723


What are the approximate numeric data types?

706


explain what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration

833


How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?

854






Can a synonym name of a table be used instead of a table name in a select statement?

769


What is the status of services on passive node for failover cluster in sql server? : sql server database administration

840


How to concatenate two strings in SQL Server.

783


How to stop a loop early with break statements in ms sql server?

761


What do you understand by hotfixes and patches in sql server?

689


If user is owning any SQL Objects, can we drop that user

1808


What is triggers and stored procedures?

689


Do you know what is rank function?

807


How would you go about developing a ssrs report?

135


What is trace flag in sql server?

718