首页 > 代码库 > Sqlserver添加或更新数据SQL

Sqlserver添加或更新数据SQL

Merge into [tableName] as tUsing(select [@id] as tid) as t1 on t1.tid=t.idwhen matched then update set name=‘name1when not matched then insert(name) values(name);

 

Sqlserver添加或更新数据SQL