我需要使用给定名称更新表中一组行的列。
哪个查询执行得更快:
更新 .... 设置 ... where name in('abc','pqr','mnp','xyz')
或者
foreach(string str in namelist){ Update .... set... where name like str }
我需要使用给定名称更新表中一组行的列。
哪个查询执行得更快:
更新 .... 设置 ... where name in('abc','pqr','mnp','xyz')
或者
foreach(string str in namelist){ Update .... set... where name like str }