From the course: MySQL Data Analysis

Unlock this course with a free trial

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

Common WHERE operators

Common WHERE operators - MySQL Tutorial

From the course: MySQL Data Analysis

Common WHERE operators

- [Instructor] Before we get into practicing the WHERE clause, let's go through the operators that WHERE works with. A WHERE clause can filter records using any of the following logical operators. Take a look in the left at the operators that can be used and what they mean on the right. You can use equals, does not equal, greater than, less than, greater than or equal to, less than or equal to, BETWEEN, which creates a range bound by two values LIKE, where you're going to look for a pattern instead of looking for a precise value. And then IN where you can specify multiple values for the server to look for. Here's an example of a query where we're selecting four columns from the payment table, but then we're filtering just to those records where the amount is equal to 0.99. Let's go ahead and pop that into Workbench and see what happens. I'm going to go ahead and run the query without the WHERE clause and then afterwards we'll run it with the WHERE clause. So as you can see here, we've…

Contents