首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

ORA-01779: cannot modify a column which maps to a non key-preserved table

2014-01-28 
update (select a.ebsq,b.citg from bdtrndtl a,cmitmdtl b where a.itemb.item) set ebsqcitg 执行此语

update (select a.ebsq,b.citg from bdtrndtl a,cmitmdtl b where
a.item=b.item)
set ebsq=citg

执行此语句时报错
ORA-01779: cannot modify a column which maps to a non key-preserved table
请问如何修改此语句
主要目的 将cmitmdtl 中citg 的值俯给 bdtrndtl 中的ebsq,条件是当cmitmdtl中的
item等于 bdtrndtl 中的item时。
请高手指点






------解决方法--------------------------------------------------------


update bdtrndtl set ebsql=b.ctig from bdtrndtl a, cmitdtl b where a.item=b.item

        

热点排行