I have two MySQL tables:
Table items Table buffer
--------------- -------------
id keywords id value
1 val1 1 val2
2 val1 2 val2
3 val1 3 val2
Both keywords and value are VARCHAR(250). Now I want to update all keywords in table items like this:
Table items
-----------------
id keywords
1 val1, val2
2 val1, val2
3 val1, val2
I tried to achieve this with CONCAT but obviously I’m doing something wrong. Can you please help me.
You need to
UPDATEwithJOINlike so:SQL Fiddle Demo