SELECT r.nid
FROM recipe_node_ingredient r,recipe_ingredient ri
WHERE r.`ingredient_id` = ri.id
AND ri.name = 'carrot'
AND r.nid NOT IN (SELECT r.nid
FROM recipe_node_ingredient r,recipe_ingredient ri
WHERE r.`ingredient_id` = ri.id AND ri.name = 'salt');
這個查詢將返回一個節點ID ..兩個選擇查詢需要幫助
而這個查詢還返回一個節點ID。
SELECT nid
FROM taxonomy_index JOIN taxonomy_term_data USING (tid)
WHERE name IN ('Desert."', 'Indian')
GROUP BY nid HAVING COUNT(*) > 1
是否可以在MySQL查詢中檢查兩個返回節點ID是否相等..?
你需要什麼結果.... @ Parthi04 –