Avec ce modèle vous n'avez plus besoin de jointure externe.
En reprenant la proposition d'al1_24 :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 SELECT p.id_postul FROM postul p INNER JOIN postul_domaines d ON p.id_postul = d.id_postul INNER JOIN postul_cfcb c ON p.id_postul = c.id_postul WHERE d.id_domaine IN (111, 3221) AND c.id_cfcb IN (3, 8) -- utilisez In ! GROUP BY p.id_postul HAVING COUNT(DISTINCT d.id_domaine) = 2 AND COUNT(DISTINCT c.id_cfcb) = 2
Partager