A view provides a consistent interface that encapsulates details of the structure of your tables that might change as your application evolves. Making liberal use of views is a key aspect of good SQL database design.
Consider the following SELECT command:
If this is a query that you use repeatedly, a shorthand method of reusing this query without retyping the entire SELECT command each time is to create a view:
The view name, employee_pay, can now be used like an ordinary table name to perform the query:
You can use views in almost any place that you use a real table. Building views on other views is also common.