📜  sql server 中的匹配 - SQL 代码示例

📅  最后修改于: 2022-03-11 15:05:14.234000             🧑  作者: Mango

代码示例1
MERGE Locations T
USING Locations_stage S ON T.LocationID=S.LocationID
WHEN MATCHED AND T.LocationID =3 THEN
DELETE 
WHEN MATCHED AND T.LocationID =1 THEN
UPDATE SET LocationName=S.LocationName;