From the course: Introduction to SQLite

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Filtering your SELECT with the WHERE clause

Filtering your SELECT with the WHERE clause - SQLite Tutorial

From the course: Introduction to SQLite

Filtering your SELECT with the WHERE clause

- [Instructor] You got a brief look at the select statements where clause in an earlier video, but let's take a closer look now. In its most basic form, the where clause lets you specify a filter condition such as where total is greater than 10. That returns a bunch of records though. You can combine conditions to narrow things down even more, such as this statement which filters the results on date as well as total. This will get all invoices with a total greater than 10 in the first quarter of calendar year 2024. You'll notice two Ands in that query. The first And separates the two conditions, and says that both conditions must be true for each row to be returned. The second And however, is part of the between operator and it's not a logical operator as such, as is the case with the first And. You can also use an Or condition. This will get all invoices with a total greater than 10 in the first quarter of either…

Contents