我有这个查询。
MERGE sales.category t
USING sales.category_staging s
ON (s.category_id = t.category_id)
WHEN MATCHED
THEN UPDATE SET
t.category_name = s.category_name,
t.amount = s.amount
WHEN NOT MATCHED BY TARGET
THEN INSERT t(category_id, category_name, amount)
VALUES select s.category_id, s.category_name, s.amount from s
WHEN NOT MATCHED BY SOURCE
THEN DELETE;
如何在合并语句中将插入与从其他表中选择一起使用?