© Ben Brumm 2019
Ben BrummBeginning Oracle SQL for Oracle Database 18chttps://doi.org/10.1007/978-1-4842-4430-2_5

5. Restricting the Results

Ben Brumm1 
(1)
Melbourne, VIC, Australia
 

We have just learned how to display certain columns from a table. In this chapter, we’ll look at how to display certain rows from a table.

Why Restrict Data?

In our earlier examples, we looked at all columns in a table and one or two columns from a table. One of the queries looked like this:
SELECT id, last_name, salary
FROM employee;

This query will show the id, last_name, and salary columns for all employees in the table. What if you didn’t want to see all employees in the table? In our example table, there are five records. But what if the table had one hundred, or one ...

Get Beginning Oracle SQL for Oracle Database 18c: From Novice to Professional now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.