Mysql Update Query,在一个查询中更新列值

时间:2018-04-03 07:47:26

标签: mysql phpmyadmin

我想在单个查询中更新列值。

enter image description here

想要在单个查询中更新列值,如上图所示,如
POS-01 - > PL-01
POS-02 - > PL-02
POS-03 - > PL-03
POS-04 - > PL-04
POS-05 - > PL-05
POS-06 - > PL-06
等等......直到表记录结束。 怎么做?

1 个答案:

答案 0 :(得分:0)

在此方案中,此查询将有所帮助。

update tbl_possession_letter set pos_letter_no=replace(pos_letter_no, 'POS-','PL-');