LOCAL AND GLOBAL TEMP TABLE

WHAT IS DIFFERENCE BETWEEN LOCAL AND GLOBAL TEMP TABLE?

LOCAL TEMP TABLE

Local temp table visible if there is a connection , and deleted when connection is closed.

 CREATE TABLE #<tablename>

GLOBAL TEMP TABLE

Global temp table is visible to all user,and are deleted when the connection that created it is closed.

 CREATE TABLE ##<tablename>

Leave a Reply