Documentation Home
MySQL 8.4 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 39.8Mb
PDF (A4) - 39.9Mb
Man Pages (TGZ) - 257.9Kb
Man Pages (Zip) - 364.9Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb


MySQL 8.4 Reference Manual  /  ...  /  ALTER VIEW Statement

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 VIEWDROP权限,以及SELECT语句中引用的每一列的某个权限。ALTER VIEW只允许视图定义者或拥有SET_ANY_DEFINERALLOW_NONEXISTENT_DEFINER权限的用户。