I was looking at the MERGE command which seems cool but still it requires the columns to be specified. I’m looking for something like:
MERGE INTO target AS t
USING source AS s
WHEN MATCHED THEN
UPDATE SET
[all t.fields = s.fields]
WHEN NOT MATCHED THEN
INSERT ([all fields])
VALUES ([all s.fields])
Is it possible?
Not everything you wanted, but partially:
WHEN NOT MATCHED THENINSERT([all fields])VALUES (field1, field2, ...)(The values list has to be complete, and match the order of the fields in your table’s definition.)