I needed to combine the strings in columnA with columnB into a new column — columnC. After Googling for quite awhile, I finally figured out how to do it:
UPDATE table SET columnC = CONCAT(columnA,'',columnB);
Note: To separate the two values in columnC (as in a First Name + Last Name scenario), all you’d do is put a space between the two ticks — i.e., ‘ ‘
4 comments on “MySQL – combining two columns into one”
thanks´s a lot me too!!!
CONCAT ('Thanks', 'A', 'Ton', '!')