The best way is either you prefill it with some initial values. Or either you can merge it like.. BEGIN TRANSACTION;
MERGE TableA AS target USING (VALUES ('c', 'a', 'b', GETDATE())) AS source(c, a, b, date) ON target.c = source.c WHEN MATCHED THEN UPDATE SET a = source.a, b = source.b, date = source.date WHEN NOT MATCHED THEN INSERT (c, a, b, date) VALUES (source.c, source.a, source.b, source.date);
MERGE TableB AS target USING (VALUES ('e', 'f', 'd', GETDATE())) AS source(e, f, d, date) ON target.e = source.e AND target.f = source.f WHEN MATCHED THEN UPDATE SET d = source.d, date = source.date WHEN NOT MATCHED THEN INSERT (e, f, d, date) VALUES (source.e, source.f, source.d, source.date);
COMMIT TRANSACTION;