Database Reference
In-Depth Information
SQL 14.8
DECLARE CURSOR141 CURSOR FOR
SELECT LNAME, FNAME, CNO
FROM CUST
WHERE (LNAME = :LNAMEPREV
AND
CNO > :CNOPREV)
OR
(LNAME > :LNAMEPREV
AND
LNAME <= :LNAMEMAX)
ORDER BY LNAME, CNO
WE WANT 20 ROWS PLEASE
Restriction: You may not remove the ORDER BY.
Hint: The WHERE clause may contain the operator NOT, but NOT makes the
predicate difficult for the optimizer (no matching).
14.2. List the most common pitfalls for your current optimizer.
Search WWH ::




Custom Search