I want to use CASE statement to update some records in sql server 2005(我想使用 CASE 语句来更新 sql server 2005 中的一些记录)
问题描述
该语句用于此目的,但 else 条件扫描表中的每条记录.有什么办法可以让未受影响的行保持原样?
The statement work for the purpose but the else condition scan through every record in the table. Is there any way I can leave the unaffected rows as they are?
推荐答案
添加WHERE
子句
这篇关于我想使用 CASE 语句来更新 sql server 2005 中的一些记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!