0
我喜歡做一個嵌套選擇多達5個過濾器,我仍然在3個過濾器。這是代碼。MySQL嵌套多達5個過濾器
SELECT * FROM anvariety_trait
INNER JOIN
(SELECT variety_id FROM anvariety_trait
INNER JOIN (SELECT variety_id FROM anvariety_trait
WHERE
trait_id = 1 and trait_value = 1) T2 USING (variety_id)
where
trait_id = 2 AND trait_value = 1) T3 USING (variety_id)
INNER JOIN tblVariety USING (variety_id)
WHERE
trait_id = 3 and trait_value = 1;
我敢打賭,沒人理解你的問題。請添加更多詳情。 – RubahMalam
好吧,它就像excel的過濾器函數,您可以選擇某個值,然後它只顯示具有選定值的行。 –