这是针对 SqlCe 的,我正在尝试更新表并为获胜者设置 won +=1,为失败者设置 lost =1。我知道我可以使用两个不同的更新语句来做到这一点,但我想知道是否可以在更新失败者“丢失”值的同时更新获胜者“赢得”值。
基本上就是这个样子,
UPDATE player SET won = won +1 WHERE id = 0
UPDATE player SET won = lost +1 WHERE id = 1
这是针对 SqlCe 的,我正在尝试更新表并为获胜者设置 won +=1,为失败者设置 lost =1。我知道我可以使用两个不同的更新语句来做到这一点,但我想知道是否可以在更新失败者“丢失”值的同时更新获胜者“赢得”值。
基本上就是这个样子,
UPDATE player SET won = won +1 WHERE id = 0
UPDATE player SET won = lost +1 WHERE id = 1