What is a correlated sub-query? A correlated sub-query is a special type of query containing a sub-query. The sub-query contained in the query actually requests values from
the outside query, creating a situation similar to a loop.
Correlated subquery in sql Part 60
SELECT NAME,
(SELECT SUM(QUANTITYSOLD) FROM
tblProductSales Where ProductID=tblProducts.Id) as QtySold FROM
tblProducts
What to choose for performance SubQuery or Joins Part 62
To drop query cache:
CHECKPOINT;
GO
DBCC DROPCLEANBUFFERS; – -clears query cache
GO
DBCC FREEPROCACHE; – clears execution plan cache
GO
No comments:
Post a Comment