MySQL Forums
Forum List  »  MySQL Workbench

update a column with data from another column
Posted by: John Biddulph
Date: July 26, 2021 02:33PM

Hi,

So I have an address column in my database but the whole address is in there, like this:

1 the street, town, county

I just managed to get the county out:

```
SELECT trim(SUBSTRING_INDEX(SUBSTRING_INDEX(address, ',', 4), ',', -1)) AS county FROM pubsuk.mypubs;
```

I would however like to UPDATE my county column with the SELECT statement above please help

Options: ReplyQuote


Subject
Views
Written By
Posted
update a column with data from another column
137
July 26, 2021 02:33PM


Sorry, only registered users may post in this forum.

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.