开发者

Is there a way to increment the value of a sql column without reading it

开发者 https://www.devze.com 2023-01-10 22:37 出处:网络
I wanted to know if there is a way I can directly increment the value of a column without reading the current value.

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


It's just UPDATE, not UPDATE TABLE.

0

精彩评论

暂无评论...
验证码 换一张
取 消