开发者

SQL update function, know which cell I want, how to find row

I want to update a row like this:

_id, AttributeA, AttributeB, AttributeC

I need to find a row based on AttributeC so tha开发者_开发问答t I can update it, lets say the desired AttributeC contains value "X"

How would this be done?

I believe this would be done with a WHERE argument but can I get this whole statement spelled out?


Something like

UPDATE table
SET AttributeB='value'
WHERE AttributeA = 'X'

This will update all rows where AttributeA = 'X' and set AttributeB to 'value', if there are more than 1.


Start by looking at the UPDATE syntax. If you get stuck, show us what you've tried and we can help further


update TableA 
set AttributeC = 'XXX' 
where AttributeC like "%X%"
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜