Drop Table If Exists #Temp;
Select A
,B
,C
,D
,E
,F
,G
Into #Temp
From WTFdbo.MyMysteryTable;
Drop Table If Exists WTFdbo.MyMysteryTable;
Create Table WTFdbo.MyMysteryTable
(
A SmallInt Not Null
,B VarChar(32) Not Null
,Cx VarChar(128) Not Null
,D SmallDateTime Null
,E SmallInt Not Null
,F Char(1) Not Null
,G VarChar(16) Not Null
);
-- Insert #2
Insert #Temp
Values (3, 'B3', 'C3', Null, 3, '3', 'G3');
-- Insert #1
Insert WTFdbo.MyMysteryTable(A, B, Cx, D, E, F, G)
Select *
From #Temp;
Became Hot Network Question