SQL server indexed temp table

IF (SELECT object_id('TempDB..#TempTable')) IS NOT NULL
DROP TABLE #TempTable
GO
--
CREATE TABLE #TempTable
(
id int,
name varchar(50),
primary key (id, name)
)
--
INSERT INTO #TempTable
SELECT 1,'name'
--
SELECT * FROM #TempTable

Comments

Popular posts from this blog

Parse XML to dynamic object in C#

C# Updating GUI from different thread