O'Reilly logo

Oracle PL/SQL in 10 Minutes, Sams Teach Yourself by Ben Forta

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

Lesson 6. Filtering Data

This lesson shows you how to use the SELECT statement’s WHERE clause to specify search conditions.

Using the WHERE Clause

Database tables usually contain large amounts of data, and you seldom need to retrieve all the rows in a table. More often than not, you’ll want to extract a subset of the table’s data as needed for specific operations or reports. Retrieving just the data you want involves specifying search criteria, also known as a filter condition.

Within a SELECT statement, you filter data by specifying search criteria in the WHERE clause. You specify the WHERE clause right after the table name (the FROM clause), as follows:

Input

SELECT prod_name, prod_priceFROM productsWHERE prod_price = 2.50;

Analysis

This ...

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