Name

ALTER VIEW

Synopsis

ALTER VIEW view [(column,  . . . )] AS SELECT...

Use this statement to change a view. It’s used primarily to change the SELECT statement that determines the view. The new SELECT statement for the view is simply given after the AS keyword. You can change the associated column names for the view by providing the new column names in a comma-separated list within the parentheses following the view’s name. Neither the old SELECT statement nor the old column names are to be given. To change a view’s name, use the DROP VIEW statement, and then create a new view with the CREATE VIEW statement. View statements are available as of Version 5.0.1 of MySQL.

Get MySQL in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.