List:General Discussion« Previous MessageNext Message »
From:Peter Brawley Date:May 11 2005 3:52pm
Subject:Re: possible join
View as plain text  
 >Although correct, many people consider this bad style - the ON clause
 >of the JOIN should contain only the join condition(s). So it would be
 >better to say

Yes indeed but here the 'zip' condition is in the join for the 
possibility that the constant zip condition could speed up the join. See 
Shawn's excellent response.

PB

-----

Harald Fuchs wrote:

>In article <4281B3C1.9070708@stripped>,
>Peter Brawley <peter.brawley@stripped> writes:
>
>  
>
>>Scott, sorry, my mistake,
>>  SELECT price
>>  FROM fedex_zones z
>>  INNER JOIN fedex_rates r ON z.zone=r.zone AND z.zip=94947
>>  WHERE r.weight = 25;
>>PB
>>    
>>
>
>Although correct, many people consider this bad style - the ON clause
>of the JOIN should contain only the join condition(s). So it would be
>better to say
>
>  SELECT price
>  FROM fedex_zones z
>  JOIN fedex_rates r ON z.zone = r.zone
>  WHERE r.weight = 25
>    AND z.zip = 94947
>
>
>  
>

Attachment: [text/html]
No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.0.308 / Virus Database: 266.11.8 - Release Date: 5/10/2005
Thread
possible joinScott Haneda11 May
  • Re: possible joinPeter Brawley11 May
    • Re: possible joinScott Haneda11 May
      • Re: possible joinmfatene11 May
      • Re: possible joinPeter Brawley11 May
      • just hiUnknown Sender11 May
        • Re: just hiJohan Höök11 May
      • Re: possible joinHarald Fuchs11 May
        • Re: possible joinSGreen11 May
        • Re: possible joinPeter Brawley11 May
Re: just hiNestor Florez11 May