只有物化视图才能被更改,普通的视图只不过是存储了你对表的访问语句,归根到底还是你对表的访问。
你可以参考一下:
http://docs.oracle.com/cd/B19306_01/server.102/b14226/repmview.htm

解决方案 »

  1.   

    这个文档更清楚http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_8004.htm#SQLRF01504
      

  2.   


    An updatable view is one you can use to insert, update, or delete base table rows. You can create a view to be inherently updatable, or you can create an INSTEAD OF trigger on any view to make it updatable.To learn whether and in what ways the columns of an inherently updatable view can be modified, query the USER_UPDATABLE_COLUMNS data dictionary view. The information displayed by this view is meaningful only for inherently updatable views. For a view to be inherently updatable, the following conditions must be met:•Each column in the view must map to a column of a single table. For example, if a view column maps to the output of a TABLE clause (an unnested collection), then the view is not inherently updatable.•The view must not contain any of the following constructs:A set operator
    A DISTINCT operator
    An aggregate or analytic function
    A GROUP BY, ORDER BY, MODEL, CONNECT BY, or START WITH clause
    A collection expression in a SELECT list
    A subquery in a SELECT list
    A subquery designated WITH READ ONLY
    Joins, with some exceptions, as documented in Oracle Database Administrator's Guide
    •In addition, if an inherently updatable view contains pseudocolumns or expressions, then you cannot update base table rows with an UPDATE statement that refers to any of these pseudocolumns or expressions.•If you want a join view to be updatable, then all of the following conditions must be true:◦The DML statement must affect only one table underlying the join.◦For an INSERT statement, the view must not be created WITH CHECK OPTION, and all columns into which values are inserted must come from a key-preserved table. A key-preserved table is one for which every primary key or unique key value in the base table is also unique in the join view.◦For an UPDATE statement, the view must not be created WITH CHECK OPTION, and all columns updated must be extracted from a key-preserved table.•For a DELETE statement, if the join results in more than one key-preserved table, then Oracle Database deletes from the first table named in the FROM clause, whether or not the view was created WITH CHECK OPTION.你的视图的COLUMN不是来自单一的一个表,所以不能更改
      

  3.   

    带union all的视图不是可更新的视图。
    可更新视图:
    1)没有使用连接函数、集合运算函数和组函数
    2)创建视图的select语句中没有聚合函数且没有GROUP BY,ONNECT BY,START WITH子句以及DISTINCT关键字
    3)select语句中不包含从基表红通过计算得到的列
    4)创建视图没包含只读属性