Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Pull sums from 2 tables
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01261037
Message ID:
01261208
Views:
11
<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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform