gpt4 book ai didi

mysql - 我如何将 +1 全局添加到 mysql 中的表?

转载 作者:行者123 更新时间:2023-12-01 00:02:44 26 4
gpt4 key购买 nike

sql server 出现问题,我的投票系统使人们延迟了 1 天。我要补偿他们,给他们加1分弥补损失。

我该怎么做?我在想这个,但我认为它行不通..

SELECT votepoints FROM vsystem where votepoints=votepoints+1

最佳答案

没有。你所说的就像搜索结果等于结果加 1。那不是真的。

你可以更新你的表:

update vsystem set votepoints = votepoints + 1

...或者得到结果+1(不修改表格):

select (votepoints + 1) as voteplus from vsystem

关于mysql - 我如何将 +1 全局添加到 mysql 中的表?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3894684/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com