这来自现代数据库管理文本,第 12 章。鉴于:
Supplier_T(SupplierNumber,City) 10,000 records, stored in Detroit
Part_T(PartNumber, Color) 100,000 records, stored in Chicago
Shipment_T(SupplierNumber, PartNumber) 1,000,000 records, stored in Detroit
用 SQL 编写的查询列出了克利夫兰红色零件供应商的供应商编号,第 19 页给出的是:
SELECT Supplier_T.SupplierNumber
FROM Supplier_T, Shipment_T, Part_T
WHERE Supplier_T.City = 'Cleveland'
AND Shipment_T.PartNumber = Part_T.PartNumber
AND Part_T.Color = 'Red';
但是 WHERE 子句中不是缺少它吗?
AND Supplier_T.SupplierNumber = Shipment_T.SupplierNumber
也许我只是太迂腐了。