how to concat two columns into one with the existing column name in mysql?

后端 未结 6 1572
旧时难觅i
旧时难觅i 2020-12-07 13:22

I want to concatenate two columns in a table with a existing column name using mysql.

An example: I am having a column FIRSTNAME and LASTNAME

6条回答
  •  难免孤独
    2020-12-07 13:38

    Just Remove * from your select clause, and mention all column names explicitly and omit the FIRSTNAME column. After this write CONCAT(FIRSTNAME, ',', LASTNAME) AS FIRSTNAME. The above query will give you the only one FIRSTNAME column.

提交回复
热议问题