October 2004
Intermediate to advanced
688 pages
16h 35m
English
• Subqueries
• Unions
• Joins
• Nested and common table expressions
• Case expressions
• Row expressions
• OLAP and star joins
• Predicates and filtering
This chapter covers some the more advanced DB2 SQL features. The discussion begins with the constructs of subqueries, unions, and joins. Then we examine nested and common table expressions, the CASE expression with its if-then-else logic, row expressions, and OLAP features. Efficient query coding also requires a knowledge of how DB2 processes predicates. We look at how predicates are classified and data is filtered during query processing.
A subquery, an SQL statement specifying a search condition, contains either a subselect or a fullselect and is used ...