Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Pull sums from 2 tables
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01261037
Message ID:
01261208
Vues:
12
<snip>
>I hate correlated subqueries. They are so slow.

Are you sure about that? The following query with correlated subquery will not be slower than any alternatives but is more readable
SELECT * FROM mytable mt1
  WHERE NOT EXISTS (SELECT * FROM mytable WHERE id = mt1.id)
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform