Icon ALTER VIEW

Alters an existing view.

Syntax
ALTER VIEW <Name> AS
<View Definition>
[WITH CHECK OPTION|WITHOUT CHECK OPTION]
[DESCRIPTION <Description>]
[VERSION <VersionNumber>]
[ATTRIBUTES <CustomAttributes>]

Usage
Use this statement to alter an existing view.

Information All clauses after the view definition are optional. If they are not specified, then they will not be altered and will stay the same as before the ALTER VIEW statement was executed.

Information If you alter a view definition using this statement, it will remove any defined indexes for the view and will require that you use the CREATE INDEX statement to recreate the index(es).

Examples
-- The following statement changes the description of the
-- EmployeesList view.

ALTER VIEW "EmployeesList" AS
SELECT Name, HireDate
FROM Employees
DESCRIPTION 'List of all employees and hire dates'

Required Privileges
The current user must be granted the ALTER privilege on the current database in order to execute this statement. Please see the User Security topic for more information.

SQL 2003 Standard Deviations
This statement deviates from the SQL 2003 standard in the following ways:

DeviationDetails
ExtensionThis SQL statement is an ElevateDB extension
Image