Databases Reference
In-Depth Information
In the following screenshot you can see the execution plan and statistics generated when the
query is executed:
Comparing the results of the two queries, we can see that the same execution plan is
chosen by the optimizer, and the same gets/reads are made to satisfy our request. They
end up in the same execution plan, so the same work is done in the same execution time.
In step 4, we execute an anti-join query to obtain the opposite result of the query executed
in the previous step. We want the amount of SALES made by a customer with a credit limit
different from the values used earlier.
In our outer query, we use the NOT EXISTS clause to consider the records that are not
related to the customers with the undesired credit limit values.
 
Search WWH ::




Custom Search