In the last episode (Mar 08), Christian Hammers said:
> While browsing old sources by a former employee I realised that he
> always did comma seperated joins and then a "where"
>       FROM 
>           tablea a, tableb b, tablec c 
>         WHERE
>           a.id=b.id and b.nr=c.nr
> whereas I learned to do
>       FROM
>           tablea a 
>           LEFT JOIN table b USING (id)
>           LEFT JOIN table c USING (nr)
> 
> Is one of the two ways preferred about the other? I like my way as it
> is easier to read and understand but would use anything to gain some
> speed in my 5+ hour selects...

They're two ways of expressing exactly the same thing.  MySQL treats
them identically internally.  Your LEFT JOIN syntax will only work if
the fields in both tables have the same name, though.  The WHERE syntax
can join any two fields together.

-- 
        Dan Nelson
        [EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to