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 see 第 15.1.23 节,“CREATE VIEW 语句”)。该语句要求视图的权限为 CREATE
VIEW“和 DROP 权限,以及对 SELECT 语句。ALTER VIEW 仅允许定义者或拥有 SET_ANY_DEFINER 或 ALLOW_NONEXISTENT_DEFINER权限。This statement changes the definition of a view, which must exist.
The syntax is similar to that for CREATE
VIEW see Section 15.1.23, “CREATE VIEW Statement”). This statement
requires the CREATE VIEW and
DROP privileges for the view, and
some privilege for each column referred to in the
SELECT statement.
ALTER VIEW is permitted only to the
definer or users with the
SET_ANY_DEFINER or
ALLOW_NONEXISTENT_DEFINER
privilege.