Reputation: 136
I want to add the text fred
to products_head_keywords_tag field in the table products_description but I dont want to wipe out the rest of the text in that field.
The following wipes out the text and adds fred but I just want to add the text fred after the other text that is already in that field.
UPDATE products_description SET products_head_keywords_tag = "fred"
Please help.
Upvotes: 0
Views: 976
Reputation: 21194
This does the trick in T-SQL:
update products_description SET products_head_keywords_tag = convert(nvarchar(max),products_head_keywords_tag) + 'fred'
I guess mysql will handle it very similar.
Edit: In MySQL concat() is the way to go:
UPDATE products_description SET products_head_keywords_tag = CONCAT(products_head_keywords_tag, 'fred')
Upvotes: 1