WHERE Versus AND

advertisements

I am trying to determine if I should use WHERE, or AND, or if it matters:

FROM table1

LEFT OUTER JOIN table3
ON --------

JOIN table2
ON --------
AND -------
AND --------
AND year = ii_year

For the last line I can also use the following: WHERE year = ii_year and I get the same results. Which should I use? Thank you I actually do have a LEFT OUTER JOIN


(Assuming MySQL for this answer).

If it's an INNER JOIN, like on your example, it makes no difference. But if you use a LEFT OUTER JOIN and put the conditions in the WHERE clause, it will behave like an INNER JOIN.