ora-00001删除之后还提示

今天遇到个奇怪的现象

SqlMapClient operation; SQL [];   --- The error occurred in config/ibatis/baseinfo.xml.  --- The error occurred while applying a parameter map.  --- Check the insertBaseinfo-InlineParameterMap.  --- Check the statement (update failed).  --- Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: 违反唯一约束条件 (COTTON.UN_BASEINFO_USERCODE); nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:   --- The error occurred in config/ibatis/baseinfo.xml.  --- The error occurred while applying a parameter map.  --- Check the insertBaseinfo-InlineParameterMap.  --- Check the statement (update failed).  --- Cause: java.sql.SQLIntegrityConstraintViolationException: ORA-00001: 违反唯一约束条件 (COTTON.UN_BASEINFO_USERCODE)


1.通过sql语句删除 ALTER TABLE baseinfo DROP CONSTRAINT UN_BASEINFO_USERCODE; --提示成功

2.再次执行插入,还是报上面的错误

3.再次执行第一步,提示已经没有此约束了,尝试查看此约束

3.1 SELECT constraint_name FROM all_constraints WHERE  owner = 'COTTON';--没有查询到

3.2 select * from dba_constraints t WHERE t.constraint_name='UN_BASEINFO_USERCODE';--也没有查询到

绕进了死胡同,说明已经没有此约束了,但程序还是报错,程序不会骗人的,肯定有某个地方没有更改。

4.直接备份到本地,通过plsql查看,发现index(索引)没有删除,ok,删掉之后一切正常。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值