0
I am trying to make a select on 4 different tables. They are all related. It all starts with the Resident.
SELECT morador.*
,unidades.*
,grupo.*
,condominios.*
FROM morador
LEFT JOIN unidades
ON id_morador = morador.id_unidades,
LEFT JOIN grupo
ON id_grupo = morador.id_grupo,
LEFT JOIN condominios
ON id_condominios = morador.id_condominio
WHERE morador.id_morador = '1';
Online test: http://sqlfiddle.com/#! 9/537518/5
FRON NO, FROM...
– Bacco
and has a lot of extra comma.
– Bacco
@Bacco I edited, even though it has errors. It is the first time I use the
LEFT JOIN
. Would you be so kind as to edit the link http://sqlfiddle.com/#! 9/537518/5 and indicate the correct form that works? Post the link edited here.– Tiago
just take the commas after JOIN, and then condos.*
– Bacco