IN
我想要在子句中具有所有选项的产品。这是我的 SQL:
SELECT
p.title, p.price FROM products AS p, product_options AS po
WHERE
p.product_id = po.product_id
AND
po.product_option_id IN (5,1,38,39)
GROUP BY
p.product_id;
IN
我想要在子句中具有所有选项的产品。这是我的 SQL:
SELECT
p.title, p.price FROM products AS p, product_options AS po
WHERE
p.product_id = po.product_id
AND
po.product_option_id IN (5,1,38,39)
GROUP BY
p.product_id;