I'm using MERGE to insert or update records into a table:
MERGE INTO target
USING SELECT * FROM @source
WHEN MATCHED THEN
UPDATE SET ...columns...
WHEN NOT MATCHED THEN
INSERT ...columns...
OUTPUT inserted.* INTO @insertedRecord
If the above statement performs an update, does the updated record be inserted into the table variable?