INNER JOIN ON與WHERE子句 - INNER JOIN ON vs WHERE clause

問題:

For simplicity, assume all relevant fields are NOT NULL . 爲簡單起見,假設全部相關字段都不爲NOT NULL this

You can do: 你能夠作: spa

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

Or else: 要否則: .net

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

Do these two work on the same way in MySQL ? 這兩個在MySQL是否以相同的方式工做? code


解決方案:

參考一: https://stackoom.com/question/4H2c/INNER-JOIN-ON與WHERE子句
參考二: https://oldbug.net/q/4H2c/INNER-JOIN-ON-vs-WHERE-clause
相關文章
相關標籤/搜索