You are here: Reference Information > SQL Reference Information > SQL Statements > ALTER VIEW

ALTER VIEW

ALTER VIEW - change the definition of an existing view

Syntax

ALTER VIEW [schema.]view [ ( column_name [ ,column_name ]... ) ] AS SELECT query

Description

ALTER VIEW uses the exact same syntax as CREATE VIEW (see CREATE VIEW) and will succeed only if the view already exists. To change a view, you need to supply the SELECT statement that defines the view. You can completely change the definition of the view, including the view columns, the columns in the select list, one or more of the tables being selected in the from clause, the where clause, etc. (see SELECT). This command combines the functionality of the DROP VIEW and CREATE VIEW statements, except that it does not alter the owner of the view or modify the privileges that have been defined on the specified view.

Parameters

Example