Restricting the Specific Rows
Learn how to use conditions on values to display restricted data.
We'll cover the following
Use of the where
clause
The select
statements returned all the customers
stored in our customers
table. This isn’t usually the case, though. Generally, the customers table contains many rows, the majority of which we aren’t interested in listing. We usually want to retrieve a subset of the customers that satisfy specific criteria.
Let’s suppose that we want to retrieve the customer named John Woo
. To do that, we have to use the where
clause. The where
clause is used with the select
statement after the table’s name from which we want to retrieve data.
Try the following command.
Get hands-on with 1400+ tech skills courses.