表都是有主键的,不可能重复!我这个视图主要是导数据用,把a表的数据更新到b表
具体sql:
update ( select a.GRNM aa,   
                b.NAME bb 
    FROM PERSONALARCHIVE b,   
         SIP_GRJBDA  a
    where a.grnm = b.pin)
set  aa = bb'

解决方案 »

  1.   

    视图能update吗
    我试过了
    即使 update表中只有一条记录也要出错
    只是出错信息不一样。
      

  2.   

    有表连接的视图是不可以update的!
      

  3.   

    只有实体化视图可以在一定的条件下update。
    更新视图是一般报如下错误:
    ORA-01732 data manipulation operation not legal on this viewCause: An attempt was made to use an UPDATE, INSERT, or DELETE statement on a view that contains expressions or functions or was derived from more than one table. If a join operation was used to create the view or the view contains virtual columns derived from functions or expressions, then the view may only be queried.Action: UPDATE, INSERT, or DELETE rows in the base tables instead and restrict the operations on the view to queries.