-1

除了 Spaulding 提供的产品外,我想点赞库存数量为 5 或更多的产品名称、供应商、类别和库存数量 然后按供应商排序,然后按库存数量排序。

这是我的代码,问题是它只显示来自 spaulding 的具有 5 个或更多库存数量的项目:

SELECT      ProdName, ProdSupplier, ProdCategory, ProdInvQty
FROM        PRODUCT
WHERE       ProdInvQty  >= 5
AND             ProdSupplier = 'Spaulding'

ORDER BY    ProdSupplier, ProdInvQty;
4

2 回答 2

2

从您模棱两可的描述中,我认为您想要(已编辑)

SELECT      ProdName, ProdSupplier, ProdCategory, ProdInvQty
FROM        PRODUCT
WHERE       (ProdInvQty  >= 5 
OR          ProdSupplier = 'Spaulding')

ORDER BY    ProdSupplier, ProdInvQty;
于 2013-10-08T05:14:45.490 回答
0
SELECT      ProdName, ProdSupplier, ProdCategory, ProdInvQty

FROM        PRODUCT

WHERE       ProdInvQty  >= 5

AND         ProdSupplier NOT LIKE 'Spaulding'

ORDER BY    ProdSupplier, ProdInvQty;
于 2013-10-08T05:24:10.717 回答