“It is easier to go down a hill than up it, but the view is much better at the top.”
Creating a Simple View
CREATE View Employee_V AS SELECT Employee_No ,First_Name ,Last_Name ,Dept_No FROM Employee_Table ;
The purposes of views are to restrict access to certain columns, derive columns or Join Tables, and to restrict access to certain rows (if a WHERE clause is used).
Basic Rules for Views
1. No ORDER BY inside the View CREATE (some exceptions exist)
2. All Aggregation needs to have an ALIAS
3. Any Derived columns (such as Math) needs an ALIAS
Above, are the basic rules of Views with excellent ...