开发者

Update a record in SQL but not overwrite....add text at the start

开发者 https://www.devze.com 2023-03-18 21:54 出处:网络
Please how I can update table where is some text? Example: I have text \"said hello\" and I want to make this \"Peter said hello\" - I want to add word Peter...

Please how I can update table where is some text?

Example: I have text "said hello" and I want to make this "Peter said hello" - I want to add word Peter...

understand开发者_StackOverflow?

Thanks very much.


Try something like :

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


Have you tried:

update your_table set field = concat('Peter ', field) where ...
0

精彩评论

暂无评论...
验证码 换一张
取 消