Modifying views

You can modify a view using the ALTER VIEW statement. The ALTER VIEW statement replaces a view definition with a new definition; it does not modify an existing view definition.

The ALTER VIEW statement maintains the permissions on the view.

Example

For example, to replace the column names with more informative names in the DepartmentSize view described above, you could use the following statement:

ALTER VIEW DepartmentSize 
  (Dept_ID, NumEmployees) 
AS
  SELECT dept_ID, count(*)
  FROM Employee
  GROUP BY dept_ID