Hi

Works #1

I tought GROUP BY was a grouping algo not a summarizing instruction.

I have problems understanding the meaning of INNER, LEFT etc.
Does LEFT mean that the joined table will be placed before the actual table
? meaning that calculations will be made against the joined table first ?

Could you esplain these terms a bit to me please ?

I think these terms are the most ambigous to the beginners like me.
I read the documentation but I'm not sure I understand it very well.

Thanks

Sandy


> Here is how I prefer to write the query you wrote (using an explicit JOIN)
>
> SELECT livres.*
>   , auteurs.id as auid
>   , CONCAT(auteurs.nom,', ',auteurs.prenom) as nomauteur
> FROM livres
> INNER JOIN auteurs
>   ON auteurs.id = livres.auteur
> ORDER BY livres.titre;
>
> That would find all books with auteurs, however it would not locate any
> books without auteurs. To list all books regardless of whether they have a
> matching auteur, you need to use one of the OUTER joins like this:
>
> SELECT livres.*
>   , auteurs.id as auid
>   , CONCAT(auteurs.nom,', ',auteurs.prenom) as nomauteur
> FROM livres
> LEFT JOIN auteurs
>   ON auteurs.id = livres.auteur
> ORDER BY livres.titre;
>
>
> That will list every book and any auteurs should they exist. Please let me
> know if this gets you going.
>
> Shawn Green
> Database Administrator
> Unimin Corporation - Spruce Pine
>
>




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to