Q: SQL 2012 lazy merge 2 tables with identical columns I have a SQL table (Person) with a large number of columns, I am passing in a DataTable (People resident in the area) from a C# program.
I have a stored procedure that takes the dataset as a user defined table type that is IDENTICAL to the table.
The stored procedure updates the current Person table to ensure it only holds people resident in the area.
Current code:
MERGE INTO PersonTable AS Target
USING @Residents AS Source
ON Target.Id = Source.Id

WHEN NOT MATCHED BY Target
       THEN INSERT VALUES (Source.column1, Source.column2 etc. *Huge long list of columns*)
   WHEN NOT MATCHED BY Source
         THEN DELETE;

Is there a way to merge tables like this without having to list every single column?
The tables are completely identical so contain the same columns and data types, it just seems like a waste of time having to type each one individually.
