From 82ff2db44ca7fe8e09d35615d3200c470e091429 Mon Sep 17 00:00:00 2001 From: Arthur DANJOU Date: Wed, 8 Oct 2025 16:22:10 +0200 Subject: [PATCH] Refactor Q2.15 query to use JOIN syntax for improved clarity and performance --- M2/SQL/scripts/TP2.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/M2/SQL/scripts/TP2.sql b/M2/SQL/scripts/TP2.sql index b0f78d0..b3be33c 100644 --- a/M2/SQL/scripts/TP2.sql +++ b/M2/SQL/scripts/TP2.sql @@ -120,8 +120,9 @@ WHERE Dno NOT IN (SELECT DISTINCT Dep FROM Employe); -- Q2.15 SELECT 'Q2.15'; -SELECT dir.Enom, d.Dnom, d.Ville FROM Employe dir, Departement d -WHERE dir.Eno = d.Directeur and (d.Dno = 1 OR d.Dno = 3); +SELECT dir.Enom, d.Dnom, d.Ville FROM Employe dir +JOIN Departement d on dir.Eno = d.Directeur +WHERE d.Dno IN (1, 3); -- Q2.16 SELECT 'Q2.16';