你能解释一下我为什么在 Oracle 中,这个查询返回一些东西:
SELECT discounts.DiscountId,
discounts.ShortDisplay,
discounts.Display,
discounts.Description,
BillDetails.BillId,
BillDetails.BillRow,
BillDetails.BillId AS BillIdTax,
BillDetails.BillRow AS BillRowTax,
BillDetails.FEDERAL_TAX_POSTPAID,
BillDetails.TOTAL_RATE
FROM discounts
INNER JOIN BillDetails
ON discounts.DiscountId = BillDetails.DiscountId
RIGHT OUTER JOIN BillDetailsTax
ON BillDetails.BillId = BillDetailsTax.BillId
AND BillDetails.BillRow = BillDetailsTax.BillRow
WHERE BillDetails.BillId = 602237
而这一个什么都没有:
SELECT discounts.DiscountId,
discounts.ShortDisplay,
discounts.Display,
discounts.Description,
BillDetails.BillId,
BillDetails.BillRow,
BillDetails.BillId AS BillIdTax,
BillDetails.BillRow AS BillRowTax,
BillDetails.FEDERAL_TAX_POSTPAID,
BillDetails.TOTAL_RATE
FROM BillDetails,
BillDetailsTax BillDetails,
discounts
WHERE BillDetails.BillRow = BillDetailsTax.BillRow(+)
AND BillDetails.BillId = BillDetailsTax.BillId(+)
AND BillDetails.DiscountId = discounts.DiscountId
AND BillDetails.BillId = 602237
这两个查询不相似吗?
谢谢!