Correlated Sub-QueriesWhat are they?
select c.*
from customers c, orders o
where c.custid = o.custid
and o.ord_date = TODAY
select c.*
from customers c
where c.custid in (
select custid
from orders
where ord_date = TODAY
)
This is an example of a noncorrelated sub-query.
The performance of these two should be the same.
Previous slide
Next slide
Back to first slide
View graphic version