Category: SQL

  • Left join pitfalls – LEFT JOIN + INNER JOIN = INNER JOIN

    Left join pitfalls – LEFT JOIN + INNER JOIN = INNER JOIN

    This post is a quick public service announcement to serve as a reminder to be careful with joins in SQL, particularly in queries with a large number of INNER and LEFT JOINs. An INNER JOIN onto a LEFT JOIN will effectively make that LEFT JOIN an INNER JOIN. Example The test query below is against…

    Keep reading