开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜