SELECT SupplierName
FROM Suppliers
WHERE EXISTS (SELECT ProductName FROM Products
WHERE Products.SupplierID = Suppliers.supplierID AND Price < 20);
我想将现有子句转换为查询的IN
子句。
开始:
SELECT SupplierName
FROM Suppliers
WHERE Suppliers.SupplierID IN (
SELECT Products.SupplierID
FROM Products
WHERE Price < 20
)