MySQL Forums
Forum List  »  Newbie

left jointure
Posted by: juan bolovar
Date: April 04, 2005 08:22AM

Hello world !

I trie this query :

SELECT
T3.Name,
T3.Score,
T4.Score
FROM Mytable T3 LEFT JOIN Mytable T4 ON T3.Name=T4.Name
WHERE T3.Round=3 AND T4.Round=4

I expect a result like :
Name3, Score3, Score4 (-> for lines with Name in T3 and T4)
Name3, Score3, NULL (-> for lines with Name only in T3)

But I dont get any line with NULL in T4.Score, as when I make an INNER JOIN.

Why this query sends me the same result than an INNER JOIN ? Is it impossible to LEFT JOIN the same table ?

I work with MySQL 4.0.22, via phpMyAdmin 2.6.0-pl3.

Options: ReplyQuote


Subject
Written By
Posted
left jointure
April 04, 2005 08:22AM
April 04, 2005 10:37AM
April 04, 2005 11:08AM
April 04, 2005 11:12AM
April 05, 2005 07:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.