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;
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;
Best way to create a temp table with same columns and type as a permanent table
select top 0 * into #mytemptable from myrealtable
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us