MySQL Forums
Forum List  »  MySQL Workbench

Re: update a column with data from another column
Posted by: Peter Brawley
Date: July 26, 2021 03:06PM

It's a table not a database.

Read the manual page for Update. Given table mypubs with address column as you described ...

update mypubs
set country = trim(SUBSTRING_INDEX(SUBSTRING_INDEX(address, ',', 4), ',', -1));

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: update a column with data from another column
300
July 26, 2021 03:06PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.