Update the entry in SQL, but do not overwrite ... add text at the beginning

How can I update a table where there is text?

Example: I have the text “say hello” and I want to do it “Peter said hi” - I want to add the word Peter ...

understand?

Many thanks.

+5
source share
2 answers

Try something like:

UPDATE TABLE_NAME SET FIELD = CONCAT('Peter ',FIELD) WHERE CONDITION;
+14
source

You tried:

update your_table set field = concat('Peter ', field) where ...
+5
source

All Articles