From the course: Nail Your SQL Interview

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Querying the table with logical operators IN and BETWEEN

Querying the table with logical operators IN and BETWEEN - SQL Tutorial

From the course: Nail Your SQL Interview

Querying the table with logical operators IN and BETWEEN

- [Instructor] In this video we're going to cover BETWEEN and IN which are two more keyword operators. BETWEEN returns data that is within a range of values. Whereas IN returns data that is within a list of values. Let's explore these with some examples. So as you can see here, we have code that has our friends' first name, birthdate, clothing sizes, and favorite colors. So we can go ahead and execute this code if you haven't already done so. But I've already done it, and we have our table here that we'll be working with for these exercises. So let's continue down to our first exercise. So, feel free to pause the video at any time to do these exercises on your own and rejoin me when you're ready. (upbeat music) So exercise number one, query the entire table, and we've done that already. We're going to return the first name and shirt size, where the shirt size is in the range of medium, large, extra large, and XXL. And…

Contents