V
V
Valery Gutin2018-03-23 02:43:41
MySQL
Valery Gutin, 2018-03-23 02:43:41

What is the correct way to change the value of SQL columns?

Hello.
There is a table, there is a text column, where the usual text is for each news, you need to select and replace the word where the word "Aloha" is present with the word "User" - while the rest of the text of the news does not change. What is the best way to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stalker_RED, 2018-03-23
@alohamneploha

https://dev.mysql.com/doc/refman/5.5/en/string-fun...

UPDATE myTable SET txt=REPLACE(txt, 'Aloha', 'User')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question