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

大家帮小弟我看看这个DELETE有什么东东

2012-02-16 
大家帮我看看这个DELETE有什么错误,在线等我在做DELETE时,会报SQL delete from atmcashbox where termno

大家帮我看看这个DELETE有什么错误,在线等
我在做DELETE时,会报
SQL> delete from atmcashbox where termno='12456';
delete from atmcashbox where termno='12456'
  *
ERROR at line 1:
ORA-00001: unique constraint (DOFEPON.ATMCASHBOXH_INDEX1) violated
ORA-06512: at "DOFEPON.ATMCASHBOX_AFTER_DELETE", line 10
ORA-04088: error during execution of trigger 'DOFEPON.ATMCASHBOX_AFTER_DELETE'

这样的错误,但是偶尔有些数据又是可以DELETE掉的,我不知道是什么原因
希望各位大侠告诉我可能发生的原因
我的表是没有外键的

[解决办法]
估计是你的这个触发器ATMCASHBOX_AFTER_DELETE中要插入数据,但是插入的数据违反了唯一约束,说白来就是插入的数据存在
重复值。

引用楼主 tracyshe 的帖子:
我在做DELETE时,会报
SQL> delete from atmcashbox where termno='12456';
delete from atmcashbox where termno='12456'
*
ERROR at line 1:
ORA-00001: unique constraint (DOFEPON.ATMCASHBOXH_INDEX1) violated
ORA-06512: at "DOFEPON.ATMCASHBOX_AFTER_DELETE", line 10
ORA-04088: error during execution of trigger 'DOFEPON.ATMCASHBOX_AFTER_DELETE'

这样的错误,但是偶尔有些数据又是可…

热点排行