What is the difference between a Local temporary table and a
Global temporary table? How is each one used?

Answer Posted / sarvesh nakhate

A local temporary table exists only for the duration of a
connection or, if defined inside a compound statement, for
the duration of the compound statement.

A global temporary table remains in the database
permanently, but the rows exist only within a given
connection. When connection is closed, the data in the
global temporary table disappears. However, the table
definition remains with the database for access when
database is opened next time.

Is This Answer Correct ?    17 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get the definition of a user defined function back?

808


How to create a store procedure with encryption?

711


What are the indexes in sql server?

715


If the job running very slow what is the action you do

1609


Tell me what do we need queues in sql service broker?

712


Explain log shipping?

774


What is cursors?

812


wat wil hapn if we give the both read and deny read permission to user?

1866


What is subquery? Explain the properties of a subquery?

689


What are the differences between triggers and stored procedures?

736


What is the architecture of ms sql reporting service?

706


How to see the event list of an existing trigger using sys.trigger_events?

777


1 01 101 01010

1807


How to test odbc dsn connection settings?

713


How to view existing indexes on an given table using sys.indexes?

809