Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created February 24, 2018 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/ef3a9442524afdb471b85da598ec906c to your computer and use it in GitHub Desktop.
Save parzibyte/ef3a9442524afdb471b85da598ec906c to your computer and use it in GitHub Desktop.
SELECT
IF(
INSTR(nombre, ' ') <> 0,
MID(
nombre,
INSTR(nombre, ' ') + 1, #Sumar 1, por el espacio
CHAR_LENGTH(nombre) - INSTR(nombre, " ")
),
nombre
)
AS segundoNombre
FROM tblUsuarios;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment