7.1 | Introduction 204 |
7.2 | Introducing Complex Queries 204 |
7.3 | Joins 205 |
7.3.1 Why Joins Are Important 205 | |
7.3.2 Information Retrieval Based on Relationships 206 | |
7.3.3 Types of Complex Queries 206 | |
7.4 | Cartesian Product Joins 208 |
7.5 | Inner Joins 209 |
7.5.1 Equijoins 209 | |
7.5.2 Non-Equijoins 212 | |
7.5.3 Reflexive or Self Joins 213 | |
7.5.4 Using Table Aliases in Joins 216 | |
7.5.5 Performing Computations in Joins 217 | |
7.5.6 Joins with Three Tables 218 | |
7.5.7 Joins with More Than Three Tables 220 | |
7.6 | Outer Joins 223 |
7.6.1 Left Outer Joins 224 | |
7.6.2 Right Outer Joins 227 | |
7.6.3 Full Outer Joins 228 | |
7.7 | Subqueries 230 |
7.7.1 Alternate Approaches to Subqueries 230 | |
7.7.2 Passing a Single Value with a Subquery 232 | |
7.7.3 Passing More Than One Row with a Subquery 237 | |
7.7.4 Comparing a Set of Values 239 | |
7.7.5 Correlated Subqueries 242 | |
7.8 | Set Operations 244 |
7.8.1 Accessing Rows from the Intersection of Two Queries 244 | |
7.8.2 Accessing Rows from the Combination of Two Queries 247 | |
7.8.3 Concatenating Rows from Two Queries 249 | |
7.8.4 Comparing Rows from Two Queries 253 | |
7.9 | Summary 255 |