我有以下查询:
SELECT item.`ID`, item.`Name`, item.`UnitCost`,
item.`Price`, discount.`rate`
FROM item
INNER JOIN discount ON discount.`ID`=item.`DiscountID`
WHERE item.`Code`=itemCode;
如果discount未分配给item(MEANS NULL),则上述查询不返回任何行。
如何更改我的查询来处理null?如果是null,item.discountID必须返回 0?