How to create an email automatically in SQL [closed]

0

At the time of entering the names and surnames (maternal and paternal) create an email with its first two letters. Example:

  

Armando Casas Sanchez = [email protected]

    
asked by Leonel Salcedo Retamozo 04.07.2018 в 10:07
source

1 answer

2

You can update the email field by concatenating the values of the first and last names and the email domain.

update nombretabla set email = concat(substr(nombre,1,2),substr(paterno,1,2),substr(materno,1,2),"@ejemplo.pe")
    
answered by 04.07.2018 в 10:32