Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
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, "]");
Add a comment
UPDATE myTable SET ColC = CONCAT('[', ColA, '][', ColB, ']') --WHERE...
Use only this one! I've tested on the live server.
UPDATE table SET column_name = CONCAT( Column_A, ' ', Column_A );
In between single quotes will add a space. You can remove that if it is not required.
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.