Introduction
In the previous chapter, we learned how to extract data from a specific table and sort it. However, in practice, we come across a lot of scenarios where we need to filter our results based on certain criteria and conditions. Consider the example of a table containing the details of all the books available from Packt, from which we want to find the names and ISBNs of all the books that cost more than $10. This scenario is illustrated in the following figures:
The relevant columns are shown in the following table. The filtered result will look something like the second table in the following figure:
In SQL, the WHERE
clause allows us to apply the filter functionality. In this chapter, we will dig deep into using the WHERE
clause in our queries by combining and adding different...