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 the difference between value type and reference type?
How to define the name and server for a new dsn?
What are the approximate numeric data types?
explain what are the steps you will take, if you are tasked with securing an sql server? : Sql server database administration
How to compose an inquiry to demonstrate the points of interest of an understudy from students table whose name begins with k?
Can a synonym name of a table be used instead of a table name in a select statement?
What is the status of services on passive node for failover cluster in sql server? : sql server database administration
How to concatenate two strings in SQL Server.
How to stop a loop early with break statements in ms sql server?
What do you understand by hotfixes and patches in sql server?
If user is owning any SQL Objects, can we drop that user
What is triggers and stored procedures?
Do you know what is rank function?
How would you go about developing a ssrs report?
What is trace flag in sql server?