MySQL combine two columns and add into a new column

后端 未结 4 523
执念已碎
执念已碎 2020-11-28 03:39

I have the following structure with a MySQL table:

+----------------+----------------+----------+
|    zipcode     |      city      |   state  |
+-----------         


        
4条回答
  •  情书的邮戳
    2020-11-28 04:15

    Add new column to your table and perfrom the query:

    UPDATE tbl SET combined = CONCAT(zipcode, ' - ', city, ', ', state)
    

提交回复
热议问题