Friday, January 9, 2015

LEFT JOIN that acts as an OUTER JOIN

If your LEFT JOIN is acting up like an OUTER JOIN or is joining everything on the RIGHT table but this is not your intended purpose, make sure that your LEFT table's foreign key is set to NULL for it to work properly. If it has something like 0 (zero) you will have unsuspected results.