ALTER VIEW

Synopsis

ALTER VIEW [ IF EXISTS ] old_view_name RENAME TO new_view_name

Description

Renames an existing view. The optional IF EXISTS clause suppresses the error when the source view does not exist.

Examples

Rename the view users to people:

ALTER VIEW users RENAME TO people

Rename the view only if it exists:

ALTER VIEW IF EXISTS users RENAME TO people

See Also

CREATE VIEW, DROP VIEW