aeran aeran - 8 months ago 27
MySQL Question

Mysql - How to update a column using another column's value plus some strings

I have a table with the following column & value:

ColA = "8765"
ColB = "2137"

I would like to update ColB in the same table to the following value:

ColC = "[8765][2137]"

How can I do it using phpmyadmin (meaning just sql syntax)?

UPDATE table SET ColC = CONCAT("[", ColA, "][", ColB, "]");