Donate

Did you find articles useful? Please make a donation

Creating SQL temp table

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)
)

Leave a Reply

  

  

  

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>