Untitled Page

Thursday, December 27, 2012

Temporary Table in SQL Server

-- Create a temporary table by starting the table name with a pound sign (#) or double pound sign (##).

-- A single pound sign denotes a local temporary object that is only visible from the current connection.

-- A double pound sign denotes a global temporary object that is visible to all connections as long as the connection that created it is still active.

 SELECT * INTO ##MyContacts
 FROM Employee
 GO

No comments:

Post a Comment