2010-06-01 5 views

Répondre

3

Vérifiez que la syntaxe (je l'ai écrit pour SQL Server).

SELECT u.id, u.name 
FROM Unit as u 
LEFT JOIN UnitCategoryIndex as uci 
ON u.id = uci.UnitId 
where uci.id is null 
+0

Fonctionne bien, merci Abe –

1
SELECT id FROM Unit WHERE NOT EXISTS (SELECT 1 FROM UnitCategoryIndex WHERE Unit.id = UnitCategoryIndex.unitid) 
1
select * 
    from unit U 
where not exists (select * 
         from unitcategoryindex X 
        where X.unitid = U.id 
       ) 
Questions connexes