O'Reilly logo

Sams Teach Yourself Microsoft by Ben Forta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lesson 7. 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 6, “Filtering Data,” filter data using a single criteria. For a greater degree of filter control, T-SQL allows you to specify multiple WHERE clauses. These clauses may be used in two ways: as AND clauses or as OR clauses.

Plain English: Operator

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

Using the AND Operator

To filter by more than one column, you use the AND operator to ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required