O'Reilly logo

Simply SQL by Rudy Limeback

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 4 The WHERE Clause

The WHERE clause is the second clause of the SQL SELECT statement that we’ll now discuss in detail. The FROM clause, which we covered in the previous chapter, introduced the central concept behind SQL: tabular structures. It is the first clause that the database system parses and executes when we run an SQL query. A tabular structure is produced by the FROM clause using tables, joins, views, or subqueries. This tabular structure is referred to as the result set of the FROM clause.

The WHERE clause is optional. When it’s used, it acts as a filter on the rows of the result set produced by the FROM clause. The WHERE clause allows us to obtain a result set containing only the data that we’re really interested in, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required