Puneet Kishor <punk.k...@gmail.com> wrote: > But, why is #5 329743 and not 329686? Where are the extra 57 rows coming > from? I thought a LEFT JOIN was supposed to include > *all* the rows from the left table with NULLs for the columns of the right > table where there was no match. So, at most, the > resulting table would have as many rows as the rows in the left table. > Certainly not more.
The conclusion doesn't follow from the premise. Yes, a row from the left table is included in the resultset even if there are no matching rows in the right table. Which means that the resultset would contain *at least* as many rows as there are in the left table - but it certainly may contain more. For each row in the left table that has N matching rows in the right table (with N > 0), there will be N rows in the resultset. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users