简体   繁体   English

更改选择中的列值

[英]change column Value in a selection

I am trying to change a column in a selection i have made, so, selection command is 我正在尝试更改所做的选择中的一列,所以选择命令是

SELECT * FROM `HLS3011_assets_workorder`  
WHERE `date_created` >= '2016-01-01' and `date_created` < '2016-02-29'  

I would like to change the column value of "status" from 1 to 2 我想将“状态”的列值从1更改为2

Try this : 尝试这个 :

UPDATE HLS3011_assets_workorder 
SET status = 2 
WHERE date_created >= '2016-01-01' AND date_created < '2016-02-29' AND status = 1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM