开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜