The selection operation allows you to retrieve a subset of the rows in a table. To specify the rows you want, put conditions in a WHERE clause. The SELECT statement's WHERE clause specifies the criteria that a row must meet in order to be included in the selection. For example, if you want information about publishers located in California only, here's what you'd type:
SQLselect pub_id, pub_name, address, city, state
from publishers
where state = 'CA'
Here are the results you would get:
Resultspub_id pub_name address city state
====== ===================== ================== =============== =====
1389 Algodata Infosystems 3 3rd Dr. Berkeley CA
[1 row]
You can combine projection and selection in many ways to zero in on just the columns and rows in a table you want to see.
18.117.234.225