Merge into [tableName] as t Using(select [@id] as tid) as t1 on t1.tid=t.id when matched then update set name=‘name1‘ when not matched then insert(name) values(‘name‘);
时间: 2024-11-07 03:45:48
Merge into [tableName] as t Using(select [@id] as tid) as t1 on t1.tid=t.id when matched then update set name=‘name1‘ when not matched then insert(name) values(‘name‘);