有没有一种方法可以在不读取 SQL 列的情况下增加它的值
我想知道是否有一种方法可以直接增加列的值而不读取当前值。 类似于:
update table `user` set cnt = cnt+1
上面的语句给了我一个语法错误,但我确信必须有一些东西可以解决它。
谢谢
I wanted to know if there is a way I can directly increment the value of a column without reading the current value.
something like:
update table `user` set cnt = cnt+1
The above statement gave me a syntax error, but I am sure there has to be something for it.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这只是
UPDATE
,而不是UPDATE TABLE
。It's just
UPDATE
, notUPDATE TABLE
.