以下两个查询语句给出了不同的结果:
SELECT A.source_code, B.quantity
FROM Table_A AS A
LEFT JOIN Table_B AS B ON B.merchant_id = A.merchant_id
AND B.agent_id = A.agent_id
AND B.default IS NULL
WHERE A.month='2011-10-01'
AND B.type='600'
And
SELECT A.source_code, B.quantity
FROM Table_A AS A
LEFT JOIN Table_B AS B ON B.merchant_id = A.merchant_id
AND B.agent_id = A.agent_id
WHERE A.month='2011-10-01'
AND B.type='600'
AND B.default IS NULL
我之前认为这个条件会在不同的时间对两个查询执行相同的操作,我有没有漏掉什么?