I am trying to unite the name, paternal surname and maternal surname having for example a result like this: "Juan López Robles" we see how to start each word is a capital letter and follow the lower case followed by a space and so on with the other words. What I have is this:
select id_empleado,
concat((concat(upper(left(nombre,1)),lower(substring(nombre,2))),' '),
concat(concat((upper(left(apellido_paterno,1)),lower(substring(apellido_paterno,2)))),' ')),
concat((upper(left(apellido_materno,1)),lower(substring(apellido_materno,2))))
as nombre from empleado where id_empleado = 1
But I do not know how to join the concat try using concat () too but I returned the error:
Error Code: 1241. Operand should contain 1 column (s)
I hope you can help me thanks for your answers.