SELECT TBL_SchemaDetail.MaterialNo, TBL_StockMaterial.SalePrice
FROM TBL_StockMaterial RIGHT OUTER JOIN
TBL_SchemaDetail ON
TBL_StockMaterial.MaterialNo = TBL_SchemaDetail.MaterialNo AND
TBL_SchemaDetail.SchemaNo = '7411' AND TBL_StockMaterial.SalePrice = 0
条件全部放到join的on中。
SELECT TBL_SchemaDetail.MaterialNo, TBL_StockMaterial.SalePrice
FROM TBL_StockMaterial RIGHT OUTER JOIN
TBL_SchemaDetail ON
TBL_StockMaterial.MaterialNo = TBL_SchemaDetail.MaterialNo
WHERE (TBL_SchemaDetail.SchemaNo = '7411') AND (TBL_StockMaterial.SalePrice = 0)