我正在尝试比较两个表并处理此操作的结果。
SELECT * FROM table1
WHERE table1.czlowiek_id NOT IN (
SELECT table2.czlowiek_id
FROM table2
WHERE table1.czlowiek_id=table2.czlowiek_id
)
OR table1.czlowiek_id IN (
SELECT table2.czlowiek_id
FROM table2
WHERE table1.czlowiek_id=table2.czlowiek_id
AND table2.szkolenie_id IN ('$selected_one')
AND table1.instruktor IN ('$selected_two')
)
是否有一些选项可以处理此查询的结果添加另一个 WHERE 语句?