ALTER VIEW
SQL - Language Statements
ALTER VIEW
change a view
ALTER VIEW
ALTER VIEW name RENAME TO newname
Description
ALTER VIEW changes the definition of a
view.
You must own the view to use ALTER VIEW>.
To alter the owner, you must also be a direct or indirect member of the new
owning role, and that role must have CREATE privilege on
the view's schema. (These restrictions enforce that altering the
owner doesn't do anything you couldn't do by dropping and recreating the
view. However, a superuser can alter ownership of any view
anyway.)
Parameters
name
The name (optionally schema-qualified) of an existing view.
newname
The new name of the view.
Examples
To rename the view foo to
bar:
ALTER VIEW foo RENAME TO bar;
Compatibility
There is no ALTER VIEW statement in the SQL
standard.
See Also