I have a table that has two columns, and I need to combine these two and update the first column with the result.
For example, suppose this is my table:
+----+-------+-------+ | id | col1 | col2 | +----+-------+-------+ | 1 | text1 | text2 | +----+-------+-------+ | 2 | text3 | text4 | +----+-------+-------+
after concatenation my table should be:
+----+-------------+-------+ | id | col1 | col2 | +----+-------------+-------+ | 1 | text1.text2 | text2 | +----+-------------+-------+ | 2 | text3.text4 | text4 | +----+-------------+-------+
How to do it using SQL?
source share