On Tue, Feb 3, 2009 at 1:54 PM, Jerry Schwartz <jschwa...@the-infoshop.com> wrote: > From: Martin Gainty [mailto:mgai...@hotmail.com] > Sent: Tuesday, February 03, 2009 1:03 PM > To: Jerry Schwartz; mysql@lists.mysql.com > 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. ON ROUND( RAND() ) (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 joined. -- Rob Wultsch -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql?unsub=arch...@jab.org