create table blist (
serial_no varchar(8) primary key,
city char(2) not null
);
insert into blist
(serial_no, city) values
('abcd_086', 'US')
, ('abcd_087', 'US')
, ('abcd_088', 'US')
, ('abcd_089', 'US')
, ('abcd_090', 'US')
, ('dcba_001', 'US')
, ('abcd_999', 'HK')
;
update blist
set serial_no = replace(serial_no, 'abcd_', 'xyz_')
where city = 'US'
and serial_no like 'abcd%';
SELECT * FROM blist;
To embed this project on your website, copy the following code and paste it into your website's HTML: