Concat text from old database/table and insert in a new/differente database/table
UPDATE
database1.table1 AS table1
SET table1.new_column = (
SELECT group_concat(old_column SEPARATOR ' ') AS 'old_column'
FROM database2.table2 as table2
WHERE table2.id = table1.id
GROUP BY table2.id
)
Written by Luciano Sousa
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Sql
Authors
Related Tags
#sql
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#