MySQL 8.4 Release Notes
15.1.11 更改视图语句
ALTER
[ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]
[DEFINER = user]
[SQL SECURITY { DEFINER | INVOKER }]
VIEW view_name [(column_list)]
AS select_statement
[WITH [CASCADED | LOCAL] CHECK OPTION]
该语句更改了一个已存在的视图的定义。语法与CREATE VIEW
类似,见第15.1.23节,“CREATE VIEW 语句”). 该语句需要视图的CREATE VIEW
和DROP
权限,以及SELECT
语句中引用的每一列的某个权限。ALTER VIEW
只允许视图定义者或拥有SET_ANY_DEFINER
或ALLOW_NONEXISTENT_DEFINER
权限的用户。