Re: LEFT joins

From: Date: Fri, 21 Jan 2005 00:37:48 +0000
Subject: Re: LEFT joins
References: 1 2 3 4 5 6 7 8 9 10 11  Groups: php.db 
Request: Send a blank email to php-db+get-38252@lists.php.net to get a copy of this message
Basile Francesco wrote:
In general, you should not worry about faster query sintax, since mysql should (but i'm not sure) have an "optimizer" inside wich translate your sintax query in a "better" efficient one. Anyway, the "where" statement is perfectly equal to the "join" operator, it is called, in general, "theta-join" and in this case it is called "equi-join" (equi...because in the where statement you only compare attributes by the '=' operator). The only reason you want to use the "left-join", which is a particular case for a general "outer-join", is if you want to fill your result with "NULL" values rather than an empty records.
cheers for that :-) I remembered something along those lines but the specifics of JOINing always leak from my head. :-)
Jochem Maas ha scritto: ....


« previous php.db (#38252) next »