我有一个编写查询的任务,使用northwind 2007数据库获取烘焙食品和干果和坚果中所有产品的产品名称,库存数量,类别和单价。我的查询如下:
SELECT PRODUCT_NAME, QUANTITY_PER_UNIT, CATEGORY, LIST_PRICE
FROM PRODUCTS
WHERE CATEGORY = [Dried Fruits & Nuts] OR [Baked Goods & Mixes];
有人能帮我这个吗?
答案 0 :(得分:0)
大概:
SELECT
PRODUCT_NAME, QUANTITY_PER_UNIT, CATEGORY, LIST_PRICE
FROM
PRODUCTS
INNER JOIN
CATEGORIES ON PRODUCTS.CATEGORYID = CATEGORIES.CATEGORYID
WHERE
CATEGORIES.DESCRIPTION = "Dried Fruits & Nuts"
OR
CATEGORIES.CATEGORY = "Baked Goods & Mixes";