O'Reilly logo

SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, Second Edition by Michael J. Hernandez, John L. Viescas

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

Using Multiple Conditions

The requests we’ve worked with up to this point have been simple and have required only a single condition to supply the answer. Now we’ll look at how you can answer complex requests using multiple conditions. Let’s begin by considering the following request.

“Give me the first and last names of customers who live in Seattle and whose last names start with the letter ‘H’.”

Based on the knowledge you’ve gained thus far, you can ascertain that this request requires an equality comparison condition and a pattern match condition to supply an answer. You’ve identified the conditions you need, but how do you combine them into one search condition? The answer lies in the way the SQL Standard defines the syntax for a search ...

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