Creating SQL temp table

15 Aug
2009

When writing SQL queries, especially the sp (stored procedure), temp table (temporary table) can create difficulties arise. At least you need to create delete the temporary table. The way to overcome this difficulty, such as the following to create a temporary table to use.


DECLARE @TMP_TABLE_NAME(
FIELD_ID INT IDENTITY(1, 1),
FIELD_1 INT,
FIELD_2 INT,
FIELD_3 NVARCHAR(MAX)
)
Be Sociable, Share!

Comment Form

top