'where' is a filter. You're limiting records based on a criterion.
'on' is used for joining.
On Mon, Apr 25, 2011 at 10:42 AM, Andre Polykanine <andre@stripped> wrote:
> 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
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe: http://lists.mysql.com/mysql?unsub=1
>
>