Projection

The projection operation allows you to list (in the SELECT list) which columns you want to see. For example, if you want to see all the rows in the table that contain information about publishers, but only the columns that contain the publishers' names and identification numbers, you'd write this data retrieval statement:

SQL
select pub_id, pub_name
from publishers

Here are the results you would get:

Results
						pub_id pub_name
====== ========================================
0736   New Age Books
0877   Binnet & Hardley
1389   Algodata Infosystems
[3 rows]

Once again, don't concern yourself with the SQL syntax at this point. Focus on understanding the conceptual point: A projection specifies a subset of the columns in the table. Note that the results of this projection (or any other relational operation) are displayed as a table. Result tables are sometimes called derived tables to distinguish them from the base tables, which contain the raw data.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.89.173