INNER JOIN与WHERE的表现如何?

时间:2014-04-19 10:37:42

标签: mysql

我怀疑以下两个查询是否会以相同的方式工作?

使用WHERE子句:

SELECT
        table1.this, table2.that, table2.somethingelse
    FROM
        table1, table2
    WHERE
        table1.foreignkey = table2.primarykey
        AND (some other conditions)

使用INNER JOIN子句:

 SELECT
        table1.this, table2.that, table2.somethingelse
    FROM
        table1 INNER JOIN table2
        ON table1.foreignkey = table2.primarykey
    WHERE
        (some other conditions)

0 个答案:

没有答案