将数据附加到已经有数据的MySQL数据库字段 [英] Appending data to a MySQL database field that already has data in it
本文介绍了将数据附加到已经有数据的MySQL数据库字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我需要将数据添加到已包含数据的字段,而不会清除当前的内容。例如,如果字段包含HTML,我需要添加额外的HTML到字段。是否有一个SQL调用,它会做到这一点,或者我需要调用该字段中的数据,将新数据连接到现有的数据,并重新加载到数据库?
I need to "add" data to a field that already contains data without erasing whats currently there. For example if the field contains HTML, I need to add additional HTML to the field. Is there a SQL call that will do this or do I need to call the data in that field, concatenate the new data to the existing data, and reload it into the database?
推荐答案
UPDATE Table SET Field=CONCAT(Field,'your extra html');
这篇关于将数据附加到已经有数据的MySQL数据库字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文