Previous Topic: ScenariosNext Topic: The WHERE Clause


Using Conditional Retrieval

Goal

When you have completed this chapter, you will be able to create SQL statements to retrieve selected rows of data from a table and to use multiple predicates in a WHERE clause. You will also understand the order in which multiple conditions are evaluated.

Summary

Usually you want to retrieve only some rows from a table just as you want to retrieve only some columns in that table. You have already seen how to limit the number of columns displayed. Now you will see how to limit the number of rows displayed using a WHERE clause. A WHERE clause specifies criteria used in selecting rows to be retrieved.

This section contains the following topics:

The WHERE Clause

Comparison Operators and Keywords in Predicates

Using Comparison Operators in Predicates

Using Keywords in Predicates

Using Calculated Values in Predicates

Combining Predicates

Review

Scenarios