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
428
July 26, 2021 02:33PM


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.