-1

I want to update a column values in a single query.

enter image description here

Want to update column values in a single query as shown on above image like
POS-01 -> PL-01
POS-02 -> PL-02
POS-03 -> PL-03
POS-04 -> PL-04
POS-05 -> PL-05
POS-06 -> PL-06
And so on......upto end of table records. How to do that?

Muhammad Rizwan
  • 488
  • 1
  • 7
  • 23
  • Possible duplicate of [How can I use mySQL replace() to replace strings in multiple records?](https://stackoverflow.com/questions/4271186/how-can-i-use-mysql-replace-to-replace-strings-in-multiple-records) – CBroe Apr 03 '18 at 07:49

1 Answers1

0

In this Scenario this query will help.

update tbl_possession_letter set pos_letter_no=replace(pos_letter_no, 'POS-','PL-');
ScaisEdge
  • 131,976
  • 10
  • 91
  • 107
Faizan Younus
  • 793
  • 1
  • 8
  • 13