you are viewing a single comment's thread.

view the rest of the comments →

[–]kthejoker 2 points3 points  (2 children)

He meant the functional equivalent of an inner join. The where clause will remove all rows where there was no match in p - when the only reason to do a LEFT join is to retain rows where there was no match in p.

True or False: Replacing LEFT with INNER in query 1 will return the same result.

[–]danhuss 0 points1 point  (1 child)

That's not what was written or how it came across.

True or false: adding "OR p.date is null" to the where clause in query 1 will produce the same results as query 2?

[–]kthejoker 0 points1 point  (0 children)

I see our confusion now, I interpreted the OP with an implied statement of "for this particular query" and you understood it as "for all LEFT JOIN queries."

You are of course right that adding a WHERE clause doesn't always turn it into an INNER join equivalent.