Replaces a view definition with a modified version.
Syntax 1 – Alter the structure of the view
ALTER VIEW … [ owner.]view-name [ ( column-name [ , … ] ) ] … AS select-statement … [ WITH CHECK OPTION ]
Syntax 2 – Change attributes for the view
ALTER VIEW … [ owner.]view-name … { SET HIDDEN | RECOMPILE | DISABLE | ENABLE }
When you use the DISABLE clause, the view is no longer available for use by the database server to answer queries. Disabling a view is similar to dropping one, except that the view definition remains in the database. Disabling a view also disables any dependent views. Therefore, the DISABLE clause requires exclusive access, not only to the view being disabled, but to any dependent views, which are also disabled.
When you alter a view, existing permissions on the view are maintained and do not require reassignment. Instead of using the ALTER VIEW statement, you could also drop the view and recreate it using DROP VIEW and CREATE VIEW, respectively. If you do this, view permissions must be reassigned.
After completing the view alteration using Syntax 1, the database server recompiles the view. Depending on the type of change you made, if there are dependent views, the database server attempts to recompile them. If you made changes that impact a dependent view, that view may become invalid, requiring you to alter the definition for the dependent view.
Altering the structure of a view requires that you replace the entire view definition with a new definition, much as you would when creating the view using the CREATE VIEW statement.