Chapter 6. Advanced SQL Coding
• 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.
Subqueries
A subquery, an SQL statement specifying a search condition, contains either a subselect or a fullselect and is used ...
Get DB2® for z/OS® Version 8 DBA Certification Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.