ALTER VIEW

ALTER VIEW#

Redefines an existing view with a new query.

Syntax#

ALTER VIEW view name AS selectselect

Arguments#

view name

The view to redefine.

select

The new SELECT query that defines the view.

Examples#

ALTER VIEW dbo.ActiveProduct AS
SELECT Id, Name, Price, Sku
FROM   dbo.Product
WHERE  Discontinued = 0;

See also