Developers can select rows from a View. For example, suppose the database includes a view called “LargeLCD,” in which each row describes a PC monitor which diagonal exceed 19 inches. The view definition might look like this:

 

SELECT *

FROM monitors

WHERE diagonal > 21

 

Developers can select the expensive monitors merely by selecting the expensive monitors from the LargeLCD view. The resulting SQL might look like this:

 

SELECT *

FROM LargeLCD

WHERE price > 400

 

Similarly, a view can participate in a JOIN operation. For example, developers can find the sales of large monitors merely by joining the sales table to the LargeLCD view. The resulting SQL might look like this:

 

SELECT *

FROM sales

INNER JOIN

LargeLCD

ON sales.model_id

=  LargeLCD.model_id