假设我有这张桌子。
ID Message
1 Jack went to the park.
2 Jamie went to the store.
3 Lucy finished school.
如何在不完全覆盖现有值的情况下将值插入Message
列?
例如
ID Message
1 Jack went to the park **at 3pm**.
2 Jamie went to the store **at 3pm**.
3 Lucy finished school **at 3pm**.
我知道我可以通过PHP检索这些值,然后通过数组/循环使用附加值重新插入它们,但我希望通过PhpMyAdmin完全使用MySQL。
答案 0 :(得分:2)
UPDATE `table`
SET `Message` = CONCAT(`Message`, " at 3pm")
WHERE 1;