Using MySQL, I want to combine two columns in a table with an already-existing column name. As an illustration, I have several columns, including FIRSTNAME and LASTNAME. These two columns should be combined with the word FIRSTNAME alone.
So I tried this:
SELECT *, CONCAT(FIRSTNAME, ',', LASTNAME) AS FIRSTNAME FROM `customer`;
The two fields with the name FIRSTNAME are still visible. Normal values are present in one field while concatenated values are present in another. With those concatenated values, I just want one column. I have a table with more than 40 columns, however, I can only select single columns.
Can the original column be deleted using MySQL by itself?