Skip to content

How to merge 2 cells to generate a new value/text in an empty column cell?

I have a table with columns: firstName, lastName and emailAddress

firstName and lastName are populated with values but emailAddress column is empty. How do I generate and insert an email address for each person by combining their first and last names?



if the rows are already inserted the you could use update

assuming that email Address is based on a pattern like

update my_table  
set emailAddress = concat(firstName, '.',lastName,'@', '')
8 People found this is helpful