如何使用SQl更新旧值?

如何使用SQl更新旧值?,sql,ms-access,Sql,Ms Access,如何使用sql代码编写此代码我希望将最后一个值增加一步现在它没有运行,这给了我错误 Update PollOptions Set Votes =((Select Votes from PollOptions Where PK_OptionID=3)+1) OP中的SQL可能会更新所有行您的SQL将更新所有行! Update PollOptions Set Votes = Votes+1 Where PK_OptionID=3 Update PollOptions Set Votes = V

如何使用sql代码编写此代码我希望将最后一个值增加一步现在它没有运行,这给了我错误

Update PollOptions
Set Votes =((Select Votes from PollOptions Where PK_OptionID=3)+1)

OP中的SQL可能会更新所有行

您的SQL将更新所有行!
Update PollOptions Set Votes = Votes+1  Where PK_OptionID=3
Update PollOptions Set Votes = Votes + 1 where PK_OptionID=3