List:General Discussion« Previous MessageNext Message »
From:João Cândido de Souza Neto Date:April 25 2011 2:57pm
Subject:Re: LEFT JOIN and WHERE: identical or not and what is better?
View as plain text  
I can be wrong about that, but I think the difference between them should be 
irrelevant so it makes me think about a paranoiac thought.

For me, the only difference is: Chose the one you feel better to understand 
your code.

Am I wrong or not?

-- 

"Andre Polykanine" <andre@stripped> escreveu na mensagem 
news:199779304.20110425174239@ style="color:#666">stripped...
Hello everyone,
Sorry for my beginner question. Actually I have been using MySql for a
long  time  but  I  just  start  using some advanced things (earlier I
accomplished  those  tasks  with  PHP),  so  I  will  be asking stupid
questions, please bear with me.
Here is the first one.
We have two queries:
SELECT `blogs`.* FROM     `Blogs`     LEFT     JOIN     `Users`     ON
`Blogs`.`UserId`=`Users`.`Id`;
and the following one:
SELECT       `Blogs`.*      FROM      `Blogs`,      `Users`      WHERE
`Blogs`.`UserId`=`Users`.`Id`;

1. Are they identical?
2.  Which is better (faster, more optimal, more kosher, I mean, better
style...)?
Thanks!


-- 
With best regards from Ukraine,
Andre
Skype: Francophile
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion


Thread
LEFT JOIN and WHERE: identical or not and what is better?Andre Polykanine25 Apr
  • Re: LEFT JOIN and WHERE: identical or not and what is better?Mitchell Maltenfort25 Apr
  • Re: LEFT JOIN and WHERE: identical or not and what is better?joao25 Apr
  • Re: LEFT JOIN and WHERE: identical or not and what is better?Johnny Withers25 Apr
  • Re: LEFT JOIN and WHERE: identical or not and what is better?Joerg Bruehe25 Apr
  • Re: LEFT JOIN and WHERE: identical or not and what is better?,etc.hsv26 Apr
    • Re: LEFT JOIN and WHERE: identical or not and what is better?, etc.Suresh Kuna26 Apr
    • Re: LEFT JOIN and WHERE: identical or not and what is better?, etc.Andre Polykanine26 Apr
      • Re: LEFT JOIN and WHERE: identical or not and what is better?,etc.hsv27 Apr