I have a table known as address_book and I wish to change a value of column "entry_country_id" from 257 to 222. Bear in mind I have other values in this row, but I just want 257 (the value in column entry_country_id) changed to 222.
UPDATE address_book
SET entry_country_id = 222
WHERE entry_country_id = 257
OR
UPDATE address_book
SET entry_country_id = '222'
WHERE entry_country_id = '257'
if the column contains strings
Update address_book
set entry_country_id=222
where entry_country_id=257
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With