I have a table with the following names:
João Goldy Alfredo, Gaby, João Antônio, Rodrigo, Maria Aparecida, Mario
How can I get them to get their first names, and those who do not have a last name, should show anyway.
What I've tried:
SELECT SUBSTR(NOMEJOGADOR, 0, INSTR(NOMEJOGADOR, ' ', -3))
FROM JOGADOR;
But with this I only managed to get the first name of those who have a surname, since Gaby, Rodrigo and Mario do not appear in the select. Is there a way to return the first names of the last names and display the ones that do not have a last name?