Why does my left join in Access have fewer rows than the left table?

前端 未结 4 1879
挽巷
挽巷 2021-01-19 10:48

I have two tables in an MS Access 2010 database: TBLIndividuals and TblIndividualsUpdates. They have a lot of the same data, but the primary key may not be the same for a gi

4条回答
  •  無奈伤痛
    2021-01-19 11:21

    This should never happen. Unless rows are being inserted/deleted in the meantime,

    the query:

    SELECT *
    FROM a LEFT JOIN b
             ON whatever ;
    

    should never return less rows than:

    SELECT *
    FROM a ;
    

    If it happens, it's a bug. Are you sure the queries are exactly like this (and you have't omitted some detail, like a WHERE clause)? Are you sure that the first returns 4149 rows and the second one 4103 rows? You could make another check by changing the * above to COUNT(*).

提交回复
热议问题