Updatable and Insertable Views •There must be no duplicate view column names. •The view must contain all columns in the base table that do not have a default value. •The view columns must be simple column references. They must not be expressions, such as these: 3.14159 col1 + 3 UPPER(col2) col3 / col4 ( subquery ) MySQL sets a flag, called the view updatability flag, at  CREATE VIEW  time. The flag is set to  YES  (true) if UPDATE  and  DELETE  (and similar operations) are legal for the view. Otherwise, the flag is set to  NO  (false). The  IS_UPDATABLE  column in the  INFORMATION_SCHEMA.VIEWS  table displays the status of this flag. It means that the server always knows whether a view is updatable. If a view is not updatable, statements such  UPDATE ,  DELETE , and  INSERT  are illegal and are rejected. (Even if a view is updatable, it might not be possible to insert into it, as described elsewhere in this section.) The updatability of views may be affected by the value of the  updatable_views_with_limit  system variable. See Section 5.1.8, “Server System Variables” . For the following discussion, suppose that these tables and views exist: INSERT ,  UPDATE , and  DELETE  statements are permitted as follows: CREATE TABLE t1 (x INTEGER); CREATE TABLE t2 (c INTEGER); CREATE VIEW vmat AS SELECT SUM(x) AS s FROM t1; CREATE VIEW vup AS SELECT * FROM t2; CREATE VIEW vjoin AS SELECT * FROM vmat JOIN vup ON vmat.s=vup.c; • INSERT : The insert table of an  INSERT  statement may be a view reference that is merged. If the view is a join view, all components of the view must be updatable (not materialized). For a multiple-table updatable view,  INSERT  can work if it inserts into a single table. • UPDATE : The table or tables to be updated in an  UPDATE  statement may be view references that are merged. If a view is a join view, at least one component of the view must be updatable (this differs from INSERT ). This statement is invalid because one component of the join view is nonupdatable: This statement is valid; the view contains no materialized components: INSERT INTO vjoin (c) VALUES (1); INSERT INTO vup (c) VALUES (1); UPDATE vjoin SET c=c+1; UPDATE vjoin SET x=x+1; In a multiple-table  UPDATE  statement, the updated table references of the statement must be base tables or updatable view references. Nonupdated table references may be materialized views or derived tables. This statement is valid; column  c  is from the updatable part of the join view: This statement is invalid; column  x  is from the nonupdatable part: 4748