日期:2014-05-17  浏览次数:20909 次

大家帮我看看这个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'

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