简体   繁体   中英

replace all column values equal to one string with another string

I have a MYSQL table called traceclasses and I have a column in this table called value with some of its cell values equal to E as shown below. I would like to replace all such values with U. Which query should I use to do this?

在此处输入图像描述

You are looking for update :

update t
    set value = 'U'
    where value = 'E';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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