Welcome to Views. After watching this video, you will be able to: Define a view Describe when to use a view Explain the syntax for creating a view A view is an alternative way of representing data that exists in one or more tables or views. A view can include all or some of the columns from one or more base tables or existing views. Creating a view creates a named specification of a results table, which can be queried in the same way as a table. You can also change the data in the base table by running insert, update, and delete queries against the view. When you define a view, the definition of the view is stored. The data that the view represents is stored in the base tables, not by the view itself. You can use a view to: Show a selection of data for a given table, so you can omit sensitive data like tax information, birth dates, or salaries. Combine two or more tables in meaningful ways. Simplify access to data by granting access to a view without granting access to the underlying tables. Show only the portions of data relevant to the process that uses the view. For example, you can create a view that displays only non-sensitive data from the Employees table; Employee ID, name, address, job ID, manager ID, and department ID. The view does not show sensitive data like salary or birthdate. You use the CREATE VIEW statement to create a view based on one or more tables or views. To define a view, use the CREATE VIEW statement and assign a name (up to 128 characters in length) to the view. List the columns that you want to include. You can use an alias to name the columns if you wish. Use the AS SELECT clause to specify the columns in the view, and the FROM clause to specify the base table name. You can also add an optional WHERE clause to refine the rows in the view. This CREATE VIEW statement <click> creates a view called EMPINFO based on the Employees table. The SELECT statement returns the data in the view, as shown in the table below. Views are dynamic; they consist of the data that would be returned from the SELECT statement used to create them. When you use a view in another SQL statement, it behaves as though you have used a SELECT statement that returns the content of the view. The SELECT statement that you use to create the view can name other views and tables, and it can use the WHERE, GROUP BY, and HAVING clauses. It cannot use the ORDER BY clause or name a host variable. In this example the EMPINFO view is created with only the rows where the MANAGER_ID is 30002. You can use a SELECT statement to show the information from the view, and verify that only rows where the MANAGER_ID is 30002 are included. If you need to remove a view completely, <click> you can use DROP VIEW. In this video, you learned that: Views are an alternate way of accessing data in tables. They can include specified columns from multiple base tables and existing views. Once created, views can be queried like a table, and the data in the base table can be modified through the view. Views are dynamic; only the definition of the view is stored, not the data. You can use the CREATE VIEW statement to create a view based on one or more tables or existing views.