ALTER [ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}] [DEFINER = { user | CURRENT_USER }] [SQL SECURITY { DEFINER | INVOKER }] VIEW view_name [(column_list)] AS select_statement [WITH [CASCADED | LOCAL] CHECK OPTION]
This statement changes the definition of a view, which must exist. The syntax is similar to that for CREATE VIEW and the effect is the same as for CREATE OR REPLACE VIEW
if the view exists. This statement requires the CREATE VIEW
and DROP
privileges for the view, and some privilege for each column referred to in the SELECT
statement. As of MariaDB 5.1.23, ALTER VIEW
is allowed only to the definer or users with the SUPER
privilege.
ALTER VIEW v AS SELECT a, a*3 AS a2 FROM t;
© 2019 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/alter-view/