更新A字段的时候,想要保留原本的数据,而不是全部覆盖。
是文本内容,我不想用先读取,在写入的那种办法。请问应该怎么写UPDATE语句?
回复讨论(解决方案)
请举例说明!
请举例说明!
例如a字段内容是abc
UPDATE `user` SET `a` = 'aaa' WHERE `id` = '10';
执行后会a字段内容就是aaa,我想更新后的数据是:acbaaa
UPDATE `user` SET `a` = concat(`a`,'aaa') WHERE `id` = '10';
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn