The ALL
operator:
SELECT
, WHERE
and HAVING
statementsALL
means that the condition will be true only if the operation is true for all values in the range.
List the products if ALL the records in the order_details with quantity larger than 10.
Note: This will of course return FALSE because the quantity column has many different values (not only the value of 10):
SELECT product_name
FROM products
WHERE product_id = ALL (
SELECT product_id
FROM order_details
WHERE quantity > 10
);
Run Example »
截取页面反馈部分,让我们更快修复内容!也可以直接跳过填写反馈内容!