O'Reilly logo

OCA Oracle Database 11g: SQL Fundamentals I: A Real-World Certification Guide by Steve Ries

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

Examining conditions with multiple values

Often in SQL, retrieving the desired data depends more upon matching multiple values than it does on matching a single value. SQL allows us to do this in several different ways. In this section, we examine the use of range conditions, set conditions, pattern-matching, and Boolean operators.

Constructing range conditions using the BETWEEN clause

Say that we want a list of the employees who have logged in to the Companylink site. However, we want to restrict this list to only those who have logged in at least 1,000 times, but no more than 2,000 times. Using what we know of WHERE clauses so far, how would we do this? We actually have two conditions that must be met for our result set to meet our requirements. ...

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