Answers for "insert into temp table identity column"

SQL
2

create and insert into temp table

IF(@Debug = 1)
    BEGIN

        --TempTables for Testing
        CREATE TABLE #_TempTable
        (
        FIRST       INT, 
         SECOND  INT,          
        );
        INSERT INTO  #_TempTable
               SELECT @FIRST, 
			          @SECOND
					  SELECT * FROM #_TempTable
	END;
Posted by: Guest on April-02-2020
0

Best way to create a temp table with same columns and type as a permanent table

select top 0 *
into #mytemptable
from myrealtable
Posted by: Guest on December-21-2020

Code answers related to "insert into temp table identity column"

Code answers related to "SQL"

Browse Popular Code Answers by Language