Lesson 5. Advanced Data Filtering

In this lesson, you'll learn how to combine WHERE clauses to create powerful and sophisticated search conditions. You'll also learn how to use the NOT and IN operators.

Combining WHERE Clauses

All the WHERE clauses introduced in Lesson 4, “Filtering Data,” filter data using a single criteria. For a greater degree of filter control, SQL lets you specify multiple WHERE clauses. These clauses may be used in two ways: as AND clauses or as OR clauses.

image

Operator A special keyword used to join or change clauses within a WHERE clause. Also known as logical operators.

Using the AND Operator

To filter by more than ...

Get Sams Teach Yourself SQL™ in 10 Minutes, Third Edition 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.