Skip to Content
Head First SQL, 2nd Edition
book

Head First SQL, 2nd Edition

by Kimberly Fessel
June 2026
Beginner
700 pages
16h 50m
English
O'Reilly Media, Inc.
Content preview from Head First SQL, 2nd Edition

Chapter 4. Better Where Clauses Filtering Rows

Image
Figure 4-1.  

Here’s your opportunity to dig in. You’ve already tried out WHERE for simple table row filters, but now you can perform an in-depth exploration of WHERE to see what it can really do.

In this chapter, you’ll use AND to find rows that meet two or more requirements. You’ll switch to OR if you want rows that satisfy any of several conditions. And you will even unearth new keyword artifacts to aid in your quest for missing items, ranges of values, or text patterns.

So what are you waiting for? Turn the page and let the excavation begin. WHERE is your new best friend.

Misplaced identification

Uh oh, Abby doesn’t look happy. Let’s check back in with her to see what’s going on.

Figure 4-2.  

We can use a SELECT query with the filter: WHERE country = 'USA'

to find Abby some ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Head First SQL

Head First SQL

Lynn Beighley
Learning SQL

Learning SQL

Ben Forta

Publisher Resources

ISBN: 9781098163648Errata Page