4
我有这样的一个表:MySQL查询更新所有值+1,其中值小于100
create table `test`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`value` smallint (3) NOT NULL,
我试图做一个mysql
查询,在test
表中增加每row
其中value
是小于100.
我有这样的一个表:MySQL查询更新所有值+1,其中值小于100
create table `test`
(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`value` smallint (3) NOT NULL,
我试图做一个mysql
查询,在test
表中增加每row
其中value
是小于100.
update test set value=value+1 where value < 100
update table set value = (value + 1) where column <= 100;