有什么不同?
对:
select distinct maker, price from product
inner join printer
on product.model = printer.model
where color = 'y' and price <= (select min(price) from printer where color = 'y')
错误的:
select distinct maker, price from product
inner join printer
on product.model = printer.model
where color = 'y' and price <= all (select distinct price from printer where color = 'y')
我知道使用“min”在性能上会更好。但是任何人都可以解释结果有什么错误和不同吗?
表结构:
Product(maker, model, type)
Printer(code, model, color, type, price)
内克尔