List:General Discussion« Previous MessageNext Message »
From:Darryle Steplight Date:April 28 2011 1:54pm
Subject:Re: left join two tables
View as plain text  
Hi Johan,

I think you probably want something like this. Give the following a shot.

SELECT *
FROM table1
LEFT JOIN table2
ON table1.ID = table2.subID
LEFT JOIN  table3
ON  table1.ID= table3.subID

On Thu, Apr 28, 2011 at 9:41 AM, Johan De Meersman <vegivamp@stripped> wrote:
> Hey there,
>
> ----- Original Message -----
>
>> From: "Rocio Gomez Escribano" <r.gomez@stripped>
>
>> Hi!! Is it possible to create a left join consult with 2 tables??
>
>> I mean:
>
>> SELECT * FROM table1 LEFT JOIN (table2, table3) on table1.ID =
>> table2.subID and table1.ID= table3.subID
> Pretty close already. Might I suggest sampling the fine manual ?
>
> Have a look at http://dev.mysql.com/doc/refman/5.0/en/join.html
>
> --
> Bier met grenadyn
> Is als mosterd by den wyn
> Sy die't drinkt, is eene kwezel
> Hy die't drinkt, is ras een ezel
>



-- 
----------------------------------------------
"May the Source be with you."
Thread
left join two tablesRocio Gomez Escribano28 Apr
  • Re: left join two tablesJohan De Meersman28 Apr
    • Re: left join two tablesDarryle Steplight28 Apr