Pete <p...@mollysrevenge.com> wrote: > Thanks Igor. I assume your comment about the two queries not returning the > same results is because the LEFT JOIN query would return TableA rows with no > matching TableB rows, whereas the Scalar query would not.
No - it's because the LEFT JOIN query may return more than one row from TableB for each row of TableA, while the subselect query will only ever return one (even if more exist). The first query will always return the same number or more rows than the second, never fewer. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users