供应商名称 这个字段不可以更新 插入 删除 首先确认表的主外键关系,是否存在父子表关系,如果存在,则子表不允许单独修改最后,错误信息对于ORACLE来说很重要,贴出来

解决方案 »

  1.   

    不好意思看错了,是视图更新啊,不是所有视图都可以更新的,也不是所有视图的字段可以更新的,查看可更新的视图字段:
    select * from user_updatable_columns where table_name =视图名称
      

  2.   

    a:从多个关系使用联接操作导出的视图,不允许执行更新操作。 
    b:若导出视图的过程中使用分组和聚合操作,也不允许对这个视图执行更新 
    操作。 
    c:行列子集视图可执行更新操作。
      

  3.   

    create table Supplier(Fnumber int,names nvarchar2(25))
    insert into Supplier
    select 1,'z' from dual union all
    select 2,'y' from dualcreate table Goods(Fnumber int,SupplierNumber int,names nvarchar2(25))
    insert into Goods
    select 1,1,'ok' from dual union all
    select 2,2,'no' from dualselect * from Supplier
    select * from Goods
    create or replace View supplierGoods
    as
    select t1.names as k,t2.names as g from Supplier t1
    inner join Goods t2
    on t1.Fnumber=t2.suppliernumber;
    select * from supplierGoods
    insert into supplierGoods
    select 'w','okno' from dualdelete from supplierGoods where k='z'
    我的删除报错