List:General Discussion« Previous MessageNext Message »
From:Rob Wultsch Date:February 3 2009 9:10pm
Subject:Re: WHERE vs. ON
View as plain text  
On Tue, Feb 3, 2009 at 1:54 PM, Jerry Schwartz
<jschwartz@stripped> wrote:
> From: Martin Gainty [mailto:mgainty@stripped]
> Sent: Tuesday, February 03, 2009 1:03 PM
> To: Jerry Schwartz; mysql@stripped
> Subject: RE: WHERE vs. ON
> ON condition uses the same columnname from both source and target tables
> whereas any column expressions can go in the WHERE clause...
> [JS] That isn't necessarily true.
> ON a.x = b.y
> Is valid.

You don't even need to reference either table in the join.

(yes, I have found the need to use that)

Join by rand!

The on clause is just something evaluated for each row that if it
returns an expression that evaluates to true will allow the row to be

Rob Wultsch
WHERE vs. ONJerry Schwartz3 Feb
  • RE: WHERE vs. ONMartin Gainty3 Feb
    • RE: WHERE vs. ONJerry Schwartz3 Feb
      • Re: WHERE vs. ONRob Wultsch3 Feb
  • Re: WHERE vs. ONPerrin Harkins3 Feb
  • Re: WHERE vs. ONBaron Schwartz4 Feb
    • RE: WHERE vs. ONJerry Schwartz4 Feb
    • Re: WHERE vs. ONJohn Daisley4 Feb
      • RE: WHERE vs. ONJerry Schwartz4 Feb
    • Re: WHERE vs. ONClaudio Nanni4 Feb
  • Re: WHERE vs. ONMartijn Tonies4 Feb