October 2002
Beginner
864 pages
18h 41m
English
Nesting is the act of embedding a subquery within another subquery—for example,
Select * FROM SOMETHING WHERE ( SUBQUERY(SUBQUERY(SUBQUERY)));
Subqueries can be nested as deeply as your implementation of SQL allows. For example, to send out special notices to customers who spend more than the average amount of money, you would combine the information in the table CUSTOMER, as follows:
SELECT * FROM CUSTOMER NAME ADDRESS STATE ZIP PHONE REMARKS ========== ========== ====== ========== =========== ========== TRUE WHEEL 55O HUSKER NE 58702 555-4545 NONE BIKE SPEC CPT SHRIVE LA 45678 555-1234 NONE LE SHOPPE HOMETOWN KS 54678 555-1278 NONE AAA BIKE 10 OLDTOWN NE 56784 555-3421 JOHN-MGR JACKS BIKE 24 EGLIN FL 34567 555-2314 NONE ...
Read now
Unlock full access